title: Why are SWITCH and IF different in terms of Variable assignement
body: <p>I am currently using IF-Statements most of the time, but I am increasingly fond of the switch case statement, because sometimes it is a lot more readable.
  But I am wondering why the Compiler does not understand switch as well as an <code>if</code>. 
  An example:</p>
  
  <pre><code>bool decision = false;
  IEnumerable&lt;string&gt; toBeAssigned;
  
  if (decision)
  {
     toBeAssigned = getValuesA();
  }
  else
  {
     toBeAssigned = getValuesB();
  }
  
  foreach (var elem in toBeAssigned )
  {
         // do something
  }
  </code></pre>
  
  <p>This should compile fine and toBeAssigned can be used in the foreach without a problem.</p>
  
  <p>BUT:</p>
  
  <pre><code>bool decision = false;
  IEnumerable&lt;string&gt; toBeAssigned;
  
  switch(decision)
  {
    case true:       
       toBeAssigned = getValuesA();
       break;
    case false:       
       toBeAssigned = getValuesB();
       break;
  }
  
  foreach (var elem in toBeAssigned )
  {
  // do something
  }
  </code></pre>
  
  <p>Does not compile for me - the compiler complains that the Value for toBeAssigned is never assigned.
  Since both should compile to the same IL, I am curious why the Compiler treats both cases differently.</p>