編譯器錯誤 C3807
'type' :具有 ComImport 屬性的類別無法衍生自 'type2',只允許介面實作
衍生自 ComImportAttribute 的類型只能實作 介面。
範例
下列範例會產生 C3807。
// C3807.cpp
// compile with: /clr /c
ref struct S {};
interface struct I {};
[System::Runtime::InteropServices::ComImportAttribute()]
ref struct S1 : S {}; // C3807
ref struct S2 : I {};