编译器错误 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;
};