Compiler Error CS0447
Visual Studio 2008
Attributes cannot be used on type arguments, only on type parameters
This error occurs when you apply an attribute to a type argument that occurs in an invocation statement. It is acceptable to apply an attribute to a type parameter in a class or method declaration statement such as the following:
class C<[some attribute] T> {…}
The following line of code will generate this error. It is assumed that the class C, defined in the previous line of code, has a static method called MyStaticMethod.
C<[some attribute] T>.MyStaticMethod();