My general rule of thumb for app config files is to store values in
there that will be constant throughout the lifetime of an instance of the
app running. If something is bound to change during the course of the app,
then this is not the place to put it.
In .NET 1.1 and before, you had to load the config file with the Xml
classes and modify the file yourself.
In .NET 2.0 and above, you can use the classes in the
System.Configuration namespace to modify certain values and to save them
back to the config file.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"cashdeskmac" <(E-Mail Removed)> wrote in message
news:9A1305C9-9F57-4BF5-A01A-(E-Mail Removed)...
>I can retrieve a value from the appSettings section of my app.config file
>for
> a Windows application (VS 2003) but is there a way to write to this file,
> updating a value?
>
> I want to store a value which may increment from time to time, and need
> the
> value to be retained between closing the application and starting it
> again.
>
> Or should I just write it to a normal text file instead?