Compiler Error C3798
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 C3798.
specifier': property declaration cannot have override specifier (should be placed on property get/set methods instead)
A property was declared incorrectly. For more information, see
The following sample generates C3798
// C3798.cpp
// compile with: /clr /c
ref struct A {
property int Prop_1 abstract; // C3798
property int Prop_2 sealed; // C3798
// OK
property int Prop_3 {
virtual int get() abstract;
virtual void set(int i) abstract;
}
property int Prop_4 {
virtual int get() sealed;
virtual void set(int i) sealed;
}
};
Show: