編譯器錯誤 C3913
默認屬性必須編製索引
未正確定義預設屬性。
如需詳細資訊,請參閱 property。
下列範例會產生 C3913:
// C3913.cpp
// compile with: /clr /c
ref struct X {
property int default { // C3913
// try the following line instead
// property int default[int] {
int get(int) { return 0; }
void set(int, int) {}
}
};