Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 894 Bytes

compiler-error-c3651.md

File metadata and controls

37 lines (30 loc) · 894 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C3651
Compiler Error C3651
11/04/2016
C3651
C3651
a03e692e-c219-4654-9827-8415cfa5a22d

Compiler Error C3651

'member' : cannot be used as an explicit override, must be a member of a base class

An explicit override was specified, but the function being overridden was in a type that is not a base type.

For more information, see Explicit Overrides.

The following sample generates C3651:

// C3651.cpp
// compile with: /clr /c
ref class C {
public:
   virtual void func2();
};

ref class Other {
public:
   virtual void func();
};

ref class D : public C {
public:
   virtual void func() new sealed = Other::func;   // C3651
   virtual void func2() new sealed = C::func2;   // OK
};