Export (0) Print
Expand All
Expand Minimize

Compiler Error C3454

Error Message

[attribute] not allowed on class declaration

A class must be defined for it to be an attribute.

For more information, see attribute.

Example

The following sample generates C3454.

// C3454.cpp
// compile with: /clr /c
using namespace System;

[attribute]   // C3454
ref class Attr1;

[attribute]   // OK
ref class Attr2 {};

Community Additions

ADD
Show:
© 2014 Microsoft