How do you determine the name of the variable and access it on runtime? For instance, if I had two strings:
string A = "This is A!";
string B = "This is B!";
And I type A into a textbox, then I want to display the contents of A using a message box.
MessageBox.Show(A); //Variable A is retrieved from the textbox input
Is this something that is doable with reflections? If not, how can I make this work?
I can’t understand, what exactly your going to get, but you can use expressions like this:
Can you describe concrete use case instead of conceptual question?