This documentation is archived and is not being maintained.

Compiler Error CS0698 

Error Message

A generic type cannot derive from 'class' because it is an attribute class

Any class that derives from an attribute class is an attribute. Attributes are not allowed to be generic types.

The following sample generates CS0698:

// CS0698.cs
class C<T> : System.Attribute  // CS0698