Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.02 KB

compiler-error-c3798.md

File metadata and controls

43 lines (33 loc) · 1.02 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C3798
Compiler Error C3798
11/04/2016
C3798
C3798
b2f8b1d8-8812-49b8-a346-28e48f02ba5c

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

Example

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;
   }
};