In VS 2005 (Winforms Project) you have the following class supplied for you : class Settings : global::System.Configuration.ApplicationSettingsBase {
This class is actually created by the designer. With the designer you can define your settings (Expand properites folder, and select Settings file). It is nice grid with drop downs that allow you to easily add new settings. The grid columns are basically "Name", "Type", "Scope", "Default Value". Now I haven't had any problems, until I wanted to use a different type that was not in the drop down for the "Type" column. Documentation says this relating to serialization (supplied by the LocalFileSettingsProvider class):
Serializes the property to disk. It first attempts to call the ConvertToString or ConvertFromString on the type's associated TypeConverter. If this does not succeed, it uses XML serialization instead.
So according to this I would think I could use a setting with the type being set to Hashtable, no? So when I add a setting and set type to Hashtable, I then investigate the xml where it gets persisted, and find a placeholder for the hashtable, with an attribute on the xml node stating "serializeas= xml", but NO values are saved. Doesn't a Hashtable serialize to Xml without any customizations? I can not find any examples of code where people use Hashtable as a user setting, so any help or reference is greatly appreciated.
R.Bischoff
Tengas un buen dia