问题
I am using this method to store settings for my program. I want the user to be able to choose and load different application settings at run time. (i.e. the user may want to load one group of settings for one scenario, and another group of settings for another). Can anyone recommend the best way to go about this? Do I need to use another method to read/write the profiles from disk to Settings.Default, or is it possible to use multiple instances of what I am using now without having to rename the files and re-launch the program (this is how I am achieving my goal now, but I'm sure there's a better/easier way).
回答1:
It appears Bernd Linde's method of using a separate class to manage the profiles is most appropriate. It seems there is no efficient dynamic way to use Settings.settings to load data at run time so it must be handled separately.
来源:https://stackoverflow.com/questions/29347540/application-settings-profiles