This documentation is archived and is not being maintained.

Compiler Error C3814

Error Message

'class member' : this member cannot co-exist with a property of the same name

A property and another class member have the same identifier. To fix this error, change one of the identifiers.

C3814 is only reachable using /clr:oldSyntax.

The following sample generates C3814:

// C3814.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>
using namespace System;

__gc class CMyClass {
   char Size;
   __property int get_Size() {return __Size;}   // C3814
   __property void set_Size(int value) {__Size=value;}   // C3814
   int __Size;

int main() {