c# - Extend an Attribute -


here situations, use attribute myattrattribute on codebase, give property such place use [myattr], applies third party attribute [theirattr].

of course, find replace across code extend attribute, there way modify myattrattribute apply third party attribute well?

you derive myattrattribute theirattrattribute, , attribute.getcustomattribute method should work both types:

public static attribute getcustomattribute(     assembly element,     type attributetype ) 

....
attributetype
    type: system.type
    the type, or base type, of custom attribute search for.


Comments