The best way to illustrate my question is this C# example:
//It seems that the comment is required:
//I need to change the values of someString0, someString1, or someStringN
//depending on the `type` variable
ref string strKey;
switch(type)
{
case 0:
strKey = ref someString0;
break;
case 1:
strKey = ref someString1;
break;
//And so on
default:
strKey = ref someStringN;
break;
}
//Set string
strKey = "New Value";
Can I do this in C#?
PS. I know that I can do this in a function. I'm asking about an "in-line" approach.