Why is there no "Use of unassigned local variable" compile error on an empty user defined struct?
<p>The following compiles successfully:</p>

<pre><code>struct Foo {}

void Test()
{
    Foo foo;
    foo.ToString();
}
</code></pre>

<p>Whereas the following yields a "Use of unassigned local variable" compile error.</p>

<pre><code>struct Foo
{
    int i;
}

void Test()
{
    Foo foo;
    foo.ToString();
}
</code></pre>

<p>It appears that in the first case, the compiler has made some sort of inference that since the struct has no members, they do not need to be initialized. But I'm not sure that this makes sense to me. The compiler could have forced you to initialize the <code>foo</code> variable as <code>new Foo()</code>.</p>

<p>So, if in C# all local variables must be initialized before accessing, <em>why does the first example compile</em>?</p>
