Why threading is not performing correctly in c#?
<p>Hi I have a method like below:</p>

<pre><code>void Foo
{
MethodInvoker method=delegate{
frm2 frm=new frm2();
frm.show();
}
</code></pre>

<p>and I have a datagridview control inside this form which does a heavy loading from DB and loads data inside this datagridview in frm2.</p>

<p>the problem is that the main thread(form1 thread) is freezed at time when the data is attached to datagridview in frm2.Why is this happening.</p>

<p>I created two different projects and separate frm2 and form1 in these 2 projects and the results are ok and no freeze is happening to none of them.</p>
