类声明中不允许出现 [attribute]
必须为它定义一个类,使其成为特性。
有关详细信息,请参阅 属性。
示例
下面的示例生成 C3454。
// C3454.cpp
// compile with: /clr /c
using namespace System;
[attribute] // C3454
ref class Attr1;
[attribute] // OK
ref class Attr2 {};
类声明中不允许出现 [attribute]
必须为它定义一个类,使其成为特性。
有关详细信息,请参阅 属性。
下面的示例生成 C3454。
// C3454.cpp
// compile with: /clr /c
using namespace System;
[attribute] // C3454
ref class Attr1;
[attribute] // OK
ref class Attr2 {};