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
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for