共用方式為


編譯器錯誤 C3816

'declaration' 先前是以不同的 Managed 或 WinRTmodifier 宣告或定義

向前宣告或實際宣告需要屬性宣告中沒有衝突和不一致。

下列範例會產生 C3816,並示範如何修正此問題:

// C3816a.cpp
// compile with: /clr /c
class C1;
// try the following line instead
// ref class C1;

ref class C1{  // C3816, forward declaration does not use ref
};