We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

'<typename>' cannot be used as an attribute because it is not a class

Visual Studio 2008

An attempt was made to use a type that is not a class as an attribute.

Error ID: BC31503

To correct this error

  • Define custom attributes as classes that derive from System.Attribute.