C# constructor help
<p>In the following code block, why do I need to declare myData in the class, then initialize myData = new string[size] in the constructor? Why is it illegal to code private string[] myData = new string[size] ?</p>

<p>That is, why do I need to do:</p>

<pre><code>class IntIndexer
{
    private string[] myData;

    public IntIndexer(int size)
    {
        myData = new string[size];

        for (int i = 0; i &lt; size; i++)
        {
            myData[i] = "empty";
        }
    }
}
</code></pre>

<p>Instead of</p>

<pre><code>class IntIndexer
{
    private string[] myData = new string[size];

    public IntIndexer(int size)
    {    
        for (int i = 0; i &lt; size; i++)
        {
            myData[i] = "empty";
        }
    }
}
</code></pre>
