Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I'm making an application for a small sized business, it's coming along nicely. So far I've been using text documents and CSV files to store the data that they want. Nothing big, no need for an online database. My question now is this, with no 'formal' training in C# I have a couple of questions, firstly what is the purpose of app.config? Secondly, how would you store user settings of an application? I am currently testing around and tyring to explore the advantages of storing them in plain text file, or even in the registry.

What do you think?
P.S. Take it easy, if it's a dumb question apologies in advance.
Posted

1 solution

The app.config is a damn handy thing, and unless you have some fairly bizarre requirements, you should make use of it. The only bad thing about the app.config is that assemblies (DLLs) cannot easily have their own app.config.

User settings (settings that can be changed by the user) are stored in a user config file in the appropriate special (hidden) folder (ProgramData in Vista). Google "c# settings" or something like that to get an idea of using them, or even search CodeProject articles. I know there are at least three articles here that deal with user settings.

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900