[attribute]는 사용되지 않습니다. 대신 System::Attribute or Platform::Metadata를 기본 클래스로 지정합니다.
비고
[특성]은 더 이상 사용자 정의 특성을 만들기 위한 기본 구문이 아닙니다. 자세한 내용은 User-Defined Attributes을 참조하세요. CLR 코드의 경우 System::Attribute에서 특성을 파생시킵니다. Windows 런타임 코드의 경우 Platform::Metadata에서 특성을 파생시킵니다.
예시
다음 예제에서는 C4580을 생성하고 이를 해결하는 방법을 보여 줍니다.
// C4580.cpp
// compile with: /W3 /c /clr
[attribute] // C4580
public ref class Attr {
public:
int m_t;
};
public ref class Attr2 : System::Attribute {
public:
int m_t;
};