共用方式為


編譯器錯誤 C3670

'override' : 無法覆寫無法存取的基類方法 'method'

覆寫只能在存取層級讓其可在衍生型別中取得的函式上進行。 如需詳細資訊,請參閱 明確覆寫

下列範例會產生 C3670:

// C3670.cpp
// compile with: /clr /c
public ref class C {
// Uncomment the following line to resolve.
// public:
   virtual void g() { }
};

public ref class D : public C {
public:
   virtual void f() new sealed = C::g {};   // C3670
};