Compiler Error C3103
'argument': repeated named argument
An attribute can not repeat named arguments.
For more information, see User-Defined Attributes.
Example
The following sample 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 {};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for