Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Error C3657

destructors cannot explicitly override or be explicitly overridden

Destructors or finalizers cannot be explicitly overridden. For more information, see Explicit Overrides.

The following sample generates C3657.

// C3657.cpp
// compile with: /clr
public ref struct I {
   virtual ~I() { }
   virtual void a();
};

public ref struct D : I {
   virtual ~D() = I::~I {}   // C3657
   virtual void a() = I::a {}   // OK
};
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.