Strange destructor behavior, called twice, but skip code execution for the first time
<p>To simplify things let's say I have simple class definition within destructor inside</p>

<pre><code>public class MyDisposeFinalize
{
    ~MyDisposeFinalize()
    {
        var breakPoint = string.Empty;
    }
}
</code></pre>

<p>In the <code>Main</code> method I first create instance of <code>MyDisposeFinalize</code> class, then assign <code>null</code> to my instance and call for garbage collection.</p>

<pre><code>    static void Main(string[] args)
    {
        var myDispose = new MyDisposeFinalize();
        myDispose = null;
        GC.Collect();

        System.Console.ReadKey();
    }
</code></pre>

<p>I expect that my destructor will be called one time, when finalization thread process finalization queue.</p>

<p>In fact, when I put break point inside my destructor method on entry, inside and exit I have really strange behavior:</p>

<ol>
<li>Entry break point is hit</li>
<li>Then again entry break point is hit</li>
<li>Inside break point is hit</li>
<li>Exit break point is hit</li>
<li>Then again entry break point is hit</li>
</ol>

<p>The first idea was that two different threads come to execute destructor method, but then why does one of them skip method code and only execute it on second iteration? And in general why does desctructor is being called twice?</p>