2009-12-01 6 views

Répondre

3

Oui:

Attribute.IsDefined(yourType, attributeType); 

Sauf pour [Serializable], qui pourrait aussi êtreyourType.IsSerializable (si vous cochez la IL, [Serializable]ne le fait pasfait obtenir écrit comme un attribut - il y a un spécial modificateur de type, l'approche fonctionne bien, cependant).

Questions connexes