title: Why is Use of an unassigned local variable allowed here?
body: <p>Normally the compiler forbids any use of unassigned local variables, but not in the following case. Why?</p>
  <pre><code>private void Main()
  {
      // This local variable is unassigned.
      string myVar;
      
      try
      {
          // The Throw() method prevents the assignment from happening...
          myVar = Throw();
      }
      finally
      {
          // ... so myVar is still unassigned.
      }
  
      // Here we use myVar, which is unassigned, and the compiler is not complaining.
      if (myVar.Equals(&quot;Something&quot;))
      {
          // ...
      }
  }
  
  private string Throw()
  {
      throw new Exception();
  } 
  </code></pre>