Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
'argument': repeated named argument
Remarks
An attribute can not repeat named arguments.
For more information, see User-Defined Attributes.
Example
The following example generates C3103.
// C3103.cpp
// compile with: /clr /c
using namespace System;
[AttributeUsage(AttributeTargets::All)]
public ref class Attr : public Attribute {
public:
int m_t;
};
[Attr(m_t = 10, m_t = 1)] // C3103
// try the following line instead
// [Attr(m_t = 10)]
ref class A {};