编译器错误 C3650

“interface_method”:不能用作显式重写,必须是基类的虚拟成员函数

尝试对非虚拟成员执行显式重写。

有关详细信息,请参阅显式重写

以下示例生成 C3650:

// C3650.cpp
// compile with: /clr
public interface struct I {
   void a();
};

public ref class S {
public:
   static int f() { return 0; }
   static int g() { return 0; }
};

public ref struct T1 : public S, I {
   virtual int f() new sealed = S::f;   // C3650
   virtual int g() { return 0; }   // OK does not override S::g
   virtual void a() new sealed = I::a {}   // OK
};