How to get custom attributes of class in referenced dll. Class of myObject is defined in an external dll, which is referenced in my current project where I wrote following,
myObject.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public)
.Where(prop => prop.GetCustomAttributes(typeof(ExportToXmlAttribute), false).Length > 0).ToList()
This is not working.
Aucun commentaire:
Enregistrer un commentaire