Persisting user settings in C#
I can find no where to make this possible. Specifically adding a new 'setting' at run time, not design time. Sure I did this with the configuration access and writing the values, etc...however I appear to lose items that the ApplicationsSettingsBase provide. What it all boils down to is how can I add a 'setting' a runtime and still get all the benefits provided by the framework?
AaronPosted Oct 26, 2007, 10:32 AM
Thank you for the reply Alan, however I have visited those articles excluding the last one before. The issue lies in the fact that I want to define a setting a runtime, BUT I also want to have the ability to use the Reset, Reload, Upgrade off of the ApplicationBaseSetting class provided by MS. To set at runtime is working...to define at runtime and have the ability to use the Upgrade feature without an override seems to be the issue.
All help is appreciated.
AlanPosted Oct 26, 2007, 5:06 AM
There are three articles here which might help with this problem:
http://msdn2.microsoft.com/en-us/library/aa730869(vs.80).aspx
http://www.codeproject.com/csharp/UserSettings.asp
http://www.codeproject.com/useritems/PropertiesSettings.asp
Notice that only user-scope settings are read/write at runtime. Application-scope settings are read-only.
Also here's a different approach to persisting application settings which I came across recently which uses the .NET framework support for 'isolated storage':
http://www.codeproject.com/dotnet/appdata.asp