Possible Duplicate:
How to get a list of properties with a given attribute?
I have a custom class like this
public class ClassWithCustomAttributecs
{
[UseInReporte(Use=true)]
public int F1 { get; set; }
public string F2 { get; set; }
public bool F3 { get; set; }
public string F4 { get; set; }
}
I have a custom attribute UseInReporte
:
[System.AttributeUsage(System.AttributeTargets.Property ,AllowMultiple = true)]
public class UseInReporte : System.Attribute
{
public bool Use;
public UseInReporte()
{
Use = false;
}
}
No I want to get All properties that has [UseInReporte(Use=true)]
how I can do this using reflection?
thanks