I have a 2 part question.
First, as the title says, does anybody know how AttributeUsageAtribute is implemented? It can only be applied to a class that derives from Attribute and if not, it will error out with:
Attribute ‘AttributeUsage’ is only valid on classes derived from System.Attribute
Second, can I write a similar Attribute that can be applied to classes that derive from a specific class or implement a specific interface?
1) this is compiler specific
2)you can try the following trick: