views:

199

answers:

1

Is it possible to access the values from the applicationSettings section of a loaded app.config file?

I have found an example How do I retrieve appSettings, but i can't find out how to access applicationSettings this way.

+1  A: 

How did you create the settings? Using the VS settings designer? If so it should create you a strongly typed class for accessing them with. This is usually accessed using Properties.Settings.Default.SettingName

I think that it is preferred to use the applicationSettings rather than appSettings, but application settings are readonly at runtime, ie you cannot create them from your code, but it is possible to create and add appSettings at runtime I believe. I asked a question about the difference

you can find more information from msdn

Sam Holder