摘要:
转处http://www.cnblogs.com/love2wllw/archive/2010/01/28/1658719.html先获取类的Type Type type = this.GetType(); //再用Type.GetProperties获得PropertyInfo[],然后就可以用foreach 遍历了 foreach (System.Reflection.PropertyInfo PInfo in type.GetProperties()) { //用PInfo.GetValue获得值 string val = Convert.ToString(PInfo.GetValu.. 阅读全文