Set value to app.config

  • Thread starter Thread starter ucasesoftware
  • Start date Start date
U

ucasesoftware

I usualy get value form app.config with
System.Configuration.AppSettingsReader...
and it's very easy

Is there a way to Set value to app.config

Here i have a solution with Next node (System.Xml.XmlDocument) but
maybe so code are more clean...

thx for help
 
I guess this (XML DOM) is the best way to write to the app.config...

However, I don't think it's a good practice to write to this file as it was
only intended for storing properties. Maybe you could consider the registry
or a xml file?
 
ucasesoftware said:
I usualy get value form app.config with
System.Configuration.AppSettingsReader...
and it's very easy

Is there a way to Set value to app.config

Note that config files are not intended for storing user preferences. Thus
it's very unlikely that changes to config files are made after setup. You
may want to take a look at the article below which contains links to
articles and samples which demonstrate how to persis user preferences:

Storing and loading user preferences
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=userpreferences&lang=en>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top