What does assigning variable to null do?
<p>In the following I get a compile time error that says "Use of unassigned local variable 'match'"
if I just enter string match; but it works when I use string match = null;
So what is the difference and in general, if a string is not being assigned a value right away should I be assigning to null like this?</p>

<pre><code>string question = "Why do I need to assign to null";
char[] delim = { ' ' };
string[] strArr = question.Split(delim);
//Throws Error
string match;
//No Error
//string match = null;
foreach (string s in strArr)
 {
    if (s == "Why")
      {
         match = "Why";
      }
 }
Console.WriteLine(match);
</code></pre>
