The below line of code is not giving me any results, even though my custom attribute is there on some of the properties
var props = typeof(D).GetProperties().Where(prop => Attribute.IsDefined(prop, typeof(MYAttribute)));
sample property
[Serializable]
[Table()]
public class MYClass : IMyInterface
{
[Column()]
[MyAttribute(HeaderFields.MyValue)]
public string MyProp { get; set; }
}
Aucun commentaire:
Enregistrer un commentaire