Top "Propertyinfo" questions

How to tell if a PropertyInfo is of a particular enum type?

I have the following code: public class DataReader<T> where T : class { public T getEntityFromReader(IDataReader reader, IDictionary&…

c# enums propertyinfo
Get DisplayAttribute attribute from PropertyInfo

class SomeModel { [Display(Name = "Quantity Required")] public int Qty { get; set; } [Display(Name = "Cost per Item")] public int Cost { get; …

c# .net reflection data-annotations propertyinfo
Non-static method requires a target in PropertyInfo.SetValue

Ok, so I'm learning about generics and I'm trying to make this thing run, but its keep saying me the …

c# visual-studio generics propertyinfo setvalue
Why are PropertyInfo SetValue and GetValue so slow?

Why is the PropertyInfo methods for getting and setting a property so slow? If I build a delegate using Reflection.…

.net reflection reflection.emit propertyinfo
Is there a way to set properties on struct instances using reflection?

I'm trying to write some code that sets a property on a struct (important that it's a property on a …

c# reflection propertyinfo
How would I know if a property is a generic collection

I need to know if the type of a property in a class is a generic collection (List, ObservableCollection) using …

c# generics collections propertyinfo
how to get the "class type" of a property in a class through reflection?

here is a piece of code public class Order { //Primary Key public long OrderId { get; set; } //Many to One Relationship […

c# reflection propertyinfo
How to get the property that has a DataMemberAttribute with a specified name?

How can I reflectively get the property that has the DataMember with a given name (let's assume every DataMember has …

c# .net reflection properties propertyinfo
Get the default PropertyDescriptors for a type

I'm customizing how an object type is displayed in a PropertyGrid by implementing ICustomTypeDescriptor. I'm allowing the user to create …

c# propertygrid propertyinfo propertydescriptor
Property set method not found in a derived type

As disgussed in .NET Reflection set private property one can set a property with a private setter. But when the …

c# .net-3.5 propertyinfo