M
Michelle
I'm curious if this is posible.
I've some string variables declared as const.
public const string number_1 = "This is number 1";
public const string number_2 = "This is number 2";
[. . .]
Later in my code i've a int variable iResult containing the value '1'.
When i assign the variable number_1 to a new string variable newVar using:
string newVar = "number_" + iResult
newVar contains 'number_1'.
But is it possible to ensure that newVar contains 'This is number 1'.
(make the string act like a variable name)
Thanks in advance,
Michelle
I've some string variables declared as const.
public const string number_1 = "This is number 1";
public const string number_2 = "This is number 2";
[. . .]
Later in my code i've a int variable iResult containing the value '1'.
When i assign the variable number_1 to a new string variable newVar using:
string newVar = "number_" + iResult
newVar contains 'number_1'.
But is it possible to ensure that newVar contains 'This is number 1'.
(make the string act like a variable name)
Thanks in advance,
Michelle