المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Can we use pointers or similar in C# ?



C# Programming
06-05-2009, 02:22 PM
I need to use some sort of pointer or other way for a variable to contain the name of another variable, it is a bit difficult to explain but the following (not correct) code will give the idea.

string varName;
string myVar;

myVar = "varName";
&myVar = "Whatever";

Now Variable varName contains "Whatever"

Any ideas or directions ?

Thanks