I have a string user setting and want to select a particular variable with the same name during the startup of my C# Windows app.
e.g.
I have a user setting (string) called UserSelectedInt, which is currently set to 'MyTwo'. (Please note that my variables are actually a lot more complex types than integers, I've just used them as examples.)
public static int MyOne = 12345;
public static int MyTwo = 54321;
public static int MyThree = 33333;
public int myInt = SelectMyVariableUsing(MyApp.Settings.Default.UserSelectedInt)
The user may have selected 'MyTwo' last time they closed the app, so that is the variable I want to select during startup. I hope I'm making sense.
Please can some let me know how would I achieve this?
Thanks