नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'attribute': cannot apply unmanaged attribute to 'type'
Remarks
A C++ attribute cannot be applied to a CLR type. See C++ Attributes Reference for more information.
For more information, see User-Defined Attributes.
This error can be generated as a result of compiler conformance work that was done for Visual Studio 2005: the uuid attribute is no longer allowed on a user-defined attribute using CLR programming. Use GuidAttribute instead.
Example
The following example generates C3451.
// C3451.cpp
// compile with: /clr /c
using namespace System;
[ attribute(AttributeTargets::All) ]
public ref struct MyAttr {};
[ MyAttr, helpstring("test") ] // C3451
// try the following line instead
// [ MyAttr ]
public ref struct ABC {};