Compiler Error C3799
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C3799.
indexed property cannot have an empty parameter list
An indexed property was declared incorrectly. See How to: Use Indexed Properties for more information.
The following sample generates C3799.
// C3799.cpp
// compile with: /clr /c
ref struct C {
property int default[] { // C3799
// try the following line instead
// property int default[int] {
int get(int index) { return 0; }
void set(int index, int value) {}
}
};
Show: