共用方式為


編譯器錯誤 C3734

'class':Managed 或 WinRT 類別不能是 coclass

備註

coclass 屬性不能與 Managed 或 WinRT 類別搭配使用。

Example

下列範例會產生 C3734 並示範如何修正它:

// C3734.cpp
// compile with: /clr /c
[module(name="x")];

[coclass]
ref class CMyClass {   // C3734 remove the ref keyword to resolve
};