Kompilatorfel C3652

åsidosättning: en funktion som uttryckligen åsidosätter måste vara virtuell

Anmärkningar

En funktion som gör en explicit åsidosättning måste vara virtuell. Mer information finns i Explicita åsidosättningar.

Example

I följande exempel genereras C3652:

// C3652.cpp
// compile with: /clr /c
public interface class I {
   void f();
};

public ref struct R : I {
   void f() = I::f {}   // C3652
   // try the following line instead
   // virtual void f() = I::f {}
};