.NET Configuration File Programming

Apress eBooks · 2009

W ith many applications, you can configure them to be “one size fits all,” but there will be times when you need to tell an application something unique about the environment it is running on. You have many options; here are some that come to mind: Code a unique version of the application for each environment permutation (okay, probably not the best idea). Pass arguments to the application when you start it from a command line or batch file. Have the program query the user for the information on startup. Use the Registry (yes, this solution is still available; in fact, it is still used quite frequently, but it is sort of frowned upon when developing new .NET applications). Use a configuration file.

Read the paper · More papers on PaperTik