在C#如何遍历一个对象的所有属性

PropertyInfo[]   propertys   =   new    myClass().GetType().GetProperties(); 
即可获得对象myClass的所有属性组成的集合 propertys

posted @ 2012-05-10 15:54  王春明  阅读(383)  评论(0编辑  收藏  举报