It seems to me that I always invent a wheel for each application when it needs to load / save the general settings to an xml file. What is the best way to manage the basic parameters of the application that the user can configure and need to save / restore?
I like the use of custom configuration sections in .config files in conjunction with Downloading external .config files instead of the standard app.config.
Are you using Visual Studio? There's a built-in settings manager, and I believe that it works well for most situations. Just remember to call Settings.Save() before the application closes.
Settings.Save()
Why do people recommend app.config or web.config? they are the ugliest files in the world. Try your own XML http://www.picnet.com.au/blogs/Guido/post/2009/09/10/XML-Settings-Files-No-more-webconfig.aspx
This design is easy to get used to, and once you do, you will never return to these ugly files again.
File / New Item ... and select "Settings." Then you can configure the user and application settings, and VS generates a class that gives you easy access to these settings.
This is probably not the best method (for example, bc restarts the web application), but if you need something quick and dirty, for example, for a small application where you just need to access / change some simple values, take a look at
http://www.dotnetspark.com/Forum/656-how-to-modify-webconfig-file-dynamically.aspx (see Lalit answer)
http://ramanisandeep.wordpress.com/2009/04/07/programming-the-webconfig-file-using-c/