Edit

Share via


Compiler Error C3458

'attribute1': attribute 'attribute2' already specified for 'construct'

Two attributes that are mutually exclusive were specified for the same construct.

Example

The following sample generates C3458

// C3458.cpp
// compile with: /clr /c
[System::Reflection::DefaultMember("Chars")]
public ref class MyString {
public:
   [System::Runtime::CompilerServices::IndexerName("Chars")]   // C3458
   property char default[int] {
      char get(int index);
      void set(int index, char c);
   }
};