jeudi 19 février 2015

Access the declaring class in a custom attribute?

I've created a custom attribute where I want to access the the declaring class of the custom attribute property.


For example:



public class Dec
{
[MyCustomAttribute]
public string Bar {get;set;}
}


Here I would like (in the the cass of MyCustomAttribute) to get the type of the declaring class (Dec). Is this by any means possible?






Aucun commentaire:

Enregistrer un commentaire