Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Compiler Error C3802

 

'name': invalid name for a property

A __property was declared with an invalid name.

C3802 is only reachable using /clr:oldSyntax.

The following sample generates C3802

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

__gc class Test {
public:
   __property int get_() {       // C3802, empty name for a property
      return 0;
   }

   __property int get_Test() {   // C3802, 'Test' -- parent class name
      return 0;
   }

   __property int get_val() {  // OK
      return _mValue;
   }

private:
   int _mValue;
};

int main() {
}
Show: