“Global” XML settings in C#

tuiosekt

New Member
A settings file is a nice way to access important data anywhere in a program since we can simply say\[code\]string dogType = Settings.Default.FavoriteDogType;\[/code\] or \[code\]Settings.Default.FavoriteDogType = "Chiwawa";\[/code\]I like this but the file is managed by the computer (stored in user settings). For my application, I would like to allow the user to select there own settings file (stored by them) and use this file for the settings as in \[code\]NewWayOfUsingSettings.Load("bobsFavoriteDogInfo.xml");\[/code\]and then being able to call\[code\]string dogType = NewWayOfUsingSettings.FavoriteDogType;\[/code\]anywhere in the program where "bobsFavoriteDogInfo.xml" would contain the settings to use. (alternatively, Jane could load "JanesBestDog.xml" etc.) Does C# support a simple way to do this?Thanks!
 
Top