Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 773 Bytes

compiler-error-c3813.md

File metadata and controls

31 lines (25 loc) · 773 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C3813
Compiler Error C3813
11/04/2016
C3813
C3813
ffdbc489-71bf-4cd6-988c-f824c9ab3ceb

Compiler Error C3813

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

A property can only be declared within a managed or Windows Runtime type. Native types do not support the property keyword.

Example

The following sample generates C3813 and shows how to fix it:

// C3813.cpp
// compile by using: cl /c /clr C3813.cpp
class A
{
   property int Int; // C3813
};

ref class B
{
   property int Int; // OK - declared within managed type
};