共用方式為


編譯器錯誤 C3050

'type1': ref 類別不可從 'type1' 繼承

System::ValueType 不能是參考類型的基底類別。

下列範例會產生 C3050:

// C3050.cpp
// compile with: /clr /LD
ref struct X : System::ValueType {};   // C3050
ref struct Y {};   // OK