setting variable in if statement, then told it's unassigned
<p>I want to initialize an array--I don't know how big it will be. then set it in a condition</p>

<p>so I've got:</p>

<pre><code>string[] my_string;

if(x==2)
{
my_string=File.ReadAllLines("file.txt");
}

string new_string=my_string[1];
</code></pre>

<p>It's telling me I've an unassigned local variable, because it's in the condition. How do I get around this?</p>
