Пример #1
0
 public static IEnumerable <PropertyDescriptor> Properties(this object obj)
 {
     return(ReflectionCache.GetProperties(obj));
 }
Пример #2
0
        public static PropertyDescriptor GetPropertyDesc(object obj, string propertyName)
        {
            IEnumerable <PropertyDescriptor> prop = ReflectionCache.GetProperties(obj);

            return(Enumerable.Where(prop, (el) => el.Name == propertyName).First());
        }