Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error C3802

Error Message

'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 {
   __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;

   int _mValue;

int main() {

Community Additions

© 2015 Microsoft