Edit

Compiler Warning (level 1) CS0465

Introducing a 'Finalize' method can interfere with destructor invocation. Did you intend to declare a destructor?

The compiler issues this warning when you declare a method with the signature void Finalize().

A method named Finalize can interfere with finalizer invocation. To define a finalizer, declare ~TypeName() instead of a Finalize method. For more information, see Finalizers.

Example

The following sample generates CS0465.

// CS0465.cs
// compile with: /target:library
class A
{
   public virtual void Finalize() {}   // CS0465
}

// OK
class B
{
   ~B() {}
}