摘要: //获取名为"MyClass"的类型 Type t = Type.GetType("MyClass"); //获取"MyClass"的属性 PropertyInfo[] properts = t.GetProperties(); //根据属性名获取某一属性 PropertyInfo p = t.GetProperty("Id"); //设置某一属性的值 MyClass my = new MyClass(); t.setValue(my, 123, null); 应用: public class BaseClass 阅读全文
posted @ 2011-11-09 14:32 Byrd 阅读(3053) 评论(0) 推荐(0) 编辑