No, there is nothing ready-made to do this. If you use the Visual Studio
Project Settings to create the Application Settings, what it does is to
create both a Configuration file and a class that inherits
System.Configuration.ApplicationSettingsBase. The class is used in an
application to retrieve values in the Application Configuration file.
Settings are defined as being Application-scoped or User-scoped via
attributes, as well as the default values for User Settings, with the
System.Configuration.DefaultSettingValueAttribute. So, since the default
values are not exposed as properties in the class, you would have 2 possible
ways to get at them:
1. Use reflection on the class to get the values of the attributes.
2. Write your own custom Application Settings class.
--
HTH,
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
The shortest distance between 2 points is a curve.
"RedHair" <re*****@u.s.awrote in message
news:u8**************@TK2MSFTNGP02.phx.gbl...
Yes, I know.
Is there any class is able to access them directly?
"Kevin Spencer" <un**********@nothinks.comwrote in message
news:OH**************@TK2MSFTNGP02.phx.gbl...
>They are in the application.exe.config file, in the "userSettings"
section.
--
HTH,
Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com
In case of Minimalism, break Philip Glass.
"RedHair" <re*****@u.s.awrote in message
news:OS**************@TK2MSFTNGP05.phx.gbl...
>>>I developed a Win form with VS.NET 2005 + .NET 2.0 in C#
There are some application settings are "User" scope and stored in
xxx.settings,
I can access them via Settings class and changethem with
Settings.Save();
However, if I change and save them then my app will read the change from
the user.config , my question is how to access the original default
setting?