Freigeben über


Compilerfehler C3213

Die Basisklasse 'base_type' hat eine stärkere Zugriffsbeschränkung als 'derived_type'

Bemerkungen

Ein Typ, der von einer Assembly aus sichtbar ist, muss öffentlich sichtbare Basisklassen verwenden.

Example

Im folgenden Beispiel wird C3213 generiert:

// 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;
};