·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> 网站建设开发 >> ASP.NET网站开发 >> 得到一个Object的属性

得到一个Object的属性

作者:佚名      ASP.NET网站开发编辑:admin      更新时间:2022-07-23
        PRivate static object GetPropertyValue(object obj, string property)
        {
            System.Reflection.PropertyInfo propertyInfo =  obj.GetType().GetProperty(property);
            return propertyInfo.GetValue(obj, null);
        }