I've one problem which makes me crazy. I wanted to add hashtable to settings(and added 2 hashtables), but when I tried to use it, it thrown an exception(Object reference not set to an instance of an object.). Then I looked to app.config it looked like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
</configuration>
Then I added to app.config file two hashtables and now my config file looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="APPNAME.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<APPNAME.Properties.Settings>
<setting name="UserInfo" serializeAs="System.Collections.Hashtable">
<value />
</setting>
<setting name="UserText" serializeAs="System.Collections.Hashtable">
<value />
</setting>
</APPNAME.Properties.Settings>
</userSettings>
And when I tried to use the hashtables, it thrown the following exception: The value of the properties 'serializeAs' can not be parsed.
I've googled it but unsuccessful, I've searched on msdn also haven't found.