Why can't you use 'this' in member initializers?
<p>Any ideas why I get an error if I try to do something like this:</p>

<pre><code>public class Bar
{
    public Bar(Foo foo)
    {
    }
}

public class Foo
{
    private Bar _bar = new Bar(this);
}
</code></pre>

<p>I get an error saying:</p>

<p>"Cannot use 'this' in member initializer"</p>

<p>but the following works:</p>

<pre><code>public class Foo
{
    private Bar _bar;

    public Foo()
    {
        _bar = new Bar(this);
    }
}
</code></pre>

<p>Anyone know the reason behind this? My understanding was that these would compile to the same IL, so am curious as to why one is allowed and the other isn't.</p>

<p>Thanks,
Alex</p>
