Reread of .config

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have learned that the .config for a Windows form application i read once
and never more since an application is started. I would like to know if there
isn't a methode for reading it once again to make a reload of the data. This
would make it possible to change the values in .config and use them in an
allways running application.

Thanks
 
Hi Martin

You can read your config file as many times as you want, there is no problem
there. But if you want to write values back, there is nothing in the
ConfigurationSettings class which will help you.

Instead, you'll need to parse the xml file (the config file is an xml file
as you know) and rewrite the values there, then read it once again. I
searched for an example and got this:
http://ryanfarley.com/blog/archive/2004/07/13/879.aspx

HTH
Altaf
 
Back
Top