How to make a custom application setting?I mean i want to serialize Hashtable but AFAIK that can't be done in Settings.Designer.cs and therefore must be done in separate class.But i don't know how to access the setting in that new class from other classes where i need to use the setting.The default application settings are accessed like this Properties.Settings.Default.... but what about the custom settings?Here is the new setting class...
using System;
using System.Configuration;
using System.Collections.Generic;
namespace Properties
{
internal sealed class servers : ApplicationSettingsBase
{
[ApplicationScopedSetting()]
[SettingsSerializeAs(System.Configuration.SettingsSerializeAs.Binary)]
[DefaultSettingValue(@"")]
public System.Collections.Hashtable ServersHashtable
{
get
{
return ((System.Collections.Hashtable)this["ServersHashtable"]);
}
set
{
this["ServersHashtable"] = (System.Collections.Hashtable)value;
}
}
}
}