Microsoft 'prefers' that the app.config file be considered a read-only
application initialization repository. For one thing, since there's only one
file for the application it's machine-wide rather than user-specific. Thus
it's not a good place for user-specific preferences. Probably the best place
to store user preferences is in your own XML files, either in user-specific
isolated storage, or in the directory represented by
Application.UserAppDataPath.
Quite a few people, by now, have created libraries for managing user
preferences in XML files (I've certainly done it for my own personal use).
It's a shame that MS didn't supply wrapper classes for this in the
framework, since we're all having to re-invent the wheel on this. If you
look around places like
www.gotdotnet.com or
www.sourceforge.net you'll
undoubtedly come across one or more solutions to this problem that have been
contributed by that community. I haven't contributed my own, since I doubt
that the world needs another one.
Tom Dacon
Dacon Software Consulting
"Dean Slindee" <sl*****@charter.net> wrote in message
news:10*************@corp.supernews.com...
I store several application settings in the project's "app.config" file.
I also have a form that reads these values and displays them in a listview
so that the user can adjust them. My question is: can the changes made by
the user to the settings values be saved back to "app.config" so that when the
application is launched tomorrow, the updated values are used?
Since the original app.config settings are loaded to
"projectName.exe.config", and updated there by the user, another way of
asking the same question is: how to write the values in
"projectName.exe.config" back to "app.config"?
Thanks,
Dean Slindee