In C# how to override the Finalize() method?
<p>Following function giving compilation error "Do not override object.Finalize. Instead, provide a destructor."</p>

<pre><code>protected override void Finalize()
{           
    this.Dispose();
    base.Finalize();
}
</code></pre>
