編譯器錯誤 C3213
基底類別 'base_type' 比 'derived_type' 更難以存取
要從組件顯示的類型必須使用公用可見的基底類別。
下列範例會產生 C3213:
// C3213.cpp
// compile with: /clr
private ref struct privateG {
public:
int i;
};
public ref struct publicG {
public:
int i;
};
public ref struct V : public privateG { // C3213
public:
int j;
};
public ref struct W: public publicG { // OK
public:
int j;
};