N
NJD
Hi,
I have a C# applications that makes use of user settings using the autobuilt
settings class. Using the IDE, I created a couple of user settings such as
Key1=Value1, Key2=Value2 and so on. In my program I have a variable that
holds the name of the user setting I want to read. How do I use the variable
to access the user setting?
The code I have is something like this
string myVar = "Key2";
I want to do something like
string result = MyApp.Properties.Settings.myVar;
Obviously the above line doesn't work because myVar is a variable. How do I
work around this?
Thanks,
NJD
I have a C# applications that makes use of user settings using the autobuilt
settings class. Using the IDE, I created a couple of user settings such as
Key1=Value1, Key2=Value2 and so on. In my program I have a variable that
holds the name of the user setting I want to read. How do I use the variable
to access the user setting?
The code I have is something like this
string myVar = "Key2";
I want to do something like
string result = MyApp.Properties.Settings.myVar;
Obviously the above line doesn't work because myVar is a variable. How do I
work around this?
Thanks,
NJD