नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
[attribute] is deprecated; instead specify System::Attribute or Platform::Metadata as a base class
Remarks
[attribute] is no longer the preferred syntax for creating user-defined attributes. For more information, see User-Defined Attributes. For CLR code, derive attributes from System::Attribute. For Windows Runtime code, derive attributes from Platform::Metadata.
Example
The following example generates C4580 and shows how to fix it.
// 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;
};