編譯器錯誤 C3458
'attribute1': 屬性 'attribute2 ' 已對 'construct' 指定,而這兩個屬性互斥
針對相同的建構指定了兩個互斥的屬性。
範例
下列範例會產生 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);
}
};