I'm writing an application and need to store program settings (Input Directory, Output Directory, etc) while the application is running. I'd like to have the program be able to load and use (based on an option) a production environment and a test environment.
I would set the structs up like so:
Class AppSettings
{
struct prodAppSettings
{
var settingName;
var settingName2;
var settingName3;
}
struct testAppSettings
{
var settingName;
var settingName2;
var settingName3;
}
}
I would then, in my main class, load the appropriate settings based off of what environment option the user wanted.
The class AppSettings would handle the loading of the settings (the application will interface with a web service for settings OR it can use, in times where a network connection is unavailable, a XML file that stored the last known good settings). I'm not overly familiar with structs and I'd like to get familiar with them, so this project might be a good place to do that.
EDIT
Clarified a couple of things.