編譯器錯誤 C3813
屬性宣告只可以出現於 managed 或 WinRT 類型的定義中
屬性只能在Managed或Windows 執行階段類型內宣告。 原生類型不支援 property
關鍵字。
範例
下列範例會產生 C3813,並說明如何加以修正:
// 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
};