VB.Net WPF Key Value Pair Dictionary in Application Settings -


I'm looking for a way to store a key-value pair in the application settings I have found that key-value pair dictionaries are not ordered, and therefore can not be stored in the application settings.

Currently I have tried all kinds of dictionaries and collections and they do all the work, till I restart the application, then all the settings have gone.

Somewhere I read that there is a list-show serial, but I'm still not able to get it to work. If someone can give me some VB.net examples how this app works to use the settings, it would be good!

Thank you!

The dictionary (TKE, TVL) class is actually serial but in the binary sense XmlSerialization engine is unfortunately anything Can not process IDictionary, which prevents it from working in the application settings.

What I usually do to work around this is to create a small square which is XmlSerializable and the key / value pair I think that those key / value pairs the collection of combinations. It is easily convertible to a dictionary later (in TKE, TVL) later on.

For example, if there were two item names and students

  pair of public class' student property assets as the property property named as the named string And class  

Then I use the following to convert between an array and a dictionary:

  Public function ToArray (named Map in the form (name, student)) as a couple () return map. Select (Exxption (x) new pair (x.Key, x.Value) .OARRA () termination function Public function memp (pair as air ()) as the dictionary (name, student) Return Arr.ToDictionary ( Function (x) x.Name, Function (y) y.Student) Last Function  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -