Is there a way to use a dictionary or xml in the Application Settings?
- by Shimmy
I have to store a complex type in the application settings. I thought that storing it as XML would work best.
The problem is I don't know how store XML. I prefer to store it as a managed XML rather than using just a string of raw XML having to parse it on each access. I managed to set the Type column of the setting to XDocument, but I was unable to set its value.
Is there a way to use XDocument or XML in application settings?
Update
I found a way, simply by editing the .settings file with the xml editor.
I changed it to a custom serializable dictionary, but I get the following error when I try to access the setting-property (I set it to a serialized representation of the default value).
The property 'Setting' could not be created from it's default value.
Error message: There is an error in XML document (1, 41).
Any ideas will be appreciated.