I am trying to get a list of variables of the memeber class at runtime. I know this, probably using typeof and reflection. but cannot find an example. Please someone shed light for me.
Here is an example of pseudocode:
Class Test01
{
public string str01;
public string str02;
public int myint01;
}
I need something like this (pseudocode):
Test01 tt = new Test01();
foreach(variable v in tt.PublicVariableList)
{
debug.print v.name;
debug.print v.type;
}
Please help me figure out how to do this in C # VS2005
Thank you so much
source
share