Compiler Error C3813

a property declaration can only appear within the definition of a managed type

A property can only be declared within a user-defined type.

The following sample generates C3813:

// C3813a.cpp
// compile with: /clr
class A
{
   property int Int; // C3813
};

int main()
{
}

The following sample generates C3813:

// C3813b.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>
class A
{
   __property int get_Int()   // C3813
   {
   return 10;
   };
};

int main()
{
}