得到一个Object的属性

时间:2014-06-28 12:16:27   收藏:0   阅读:305
        private static object GetPropertyValue(object obj, string property)
        {
            System.Reflection.PropertyInfo propertyInfo =  obj.GetType().GetProperty(property);
            return propertyInfo.GetValue(obj, null);
        }        

 

得到一个Object的属性,布布扣,bubuko.com

原文:http://www.cnblogs.com/dangkei/p/3798745.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!