Syntax for referring to variable name by string?
If I have member called: this.m_yodasShoeSize
and I want to refer to it by a string with something like:
this."m_" + "yodasShoeSize"
is there syntax in c# for that. I expected something like:
this["m_" + "yodasShoeSize"]
or
this[eval("m_" + "yodasShoeSize");
Also, is there a name for what I'm talking about here? I'm not sure what to call this feature, although I have seen it available in a few languages.

wadeontheweb31 reputationPosted Feb 29, 2004, 5:30 PM EST
string theMemberName = "yodasShoeSize"; Type type this.GetType(); type.GetMember(theMemberName);what is the syntax for storing the result of type.GetMember(theMemberName); or is there no way to do this and I just need to get the member over and over again as I refer to it with type.GetMember(theMemberName); Thanks for any helpsacrespRank #1,944 · 754 reputationPosted Mar 1, 2004, 1:45 AM EST
wadeontheweb31 reputationPosted Mar 1, 2004, 9:47 AM EST