Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Error C3812

Error Message

'property' must be the first token in a property declaration

When declaring a property, the __property keyword must be the first token on the line.

C3812 is only reachable using /clr:oldSyntax.

The following sample generates C3812:

// C3812.cpp
// compile with: /clr:oldSyntax /c
#using <mscorlib.dll>

__gc class X {
   static __property int get_Size() { // C3812, remove static specifier
      return 0;
   }
};
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.