我正在尝试在运行时获取类memeber变量列表.我知道这可能是使用typeof和反射.但找不到一个例子.请有人为我照亮.
这是伪代码示例:
Class Test01
{ 
 public string str01;
 public string str02;
 public int myint01;
}
我想要这样的东西(伪代码):
Test01 tt = new Test01();
foreach(variable v in tt.PublicVariableList)
{
   debug.print v.name;
   debug.print v.type;
}
请帮我弄清楚如何在C#VS2005中做到这一点
非常感谢