title: Possible to assign a return from a switch case in C#?
body: <p>All the examples I've seen of C# switch statements are as follows</p>
  
  <pre><code>var variable, result; 
  
  switch (variable) {
   case 1: result = somevalue; break;
   case 2: result = someothervalue; break;
  }
  </code></pre>
  
  <p>However, I would like to have something like</p>
  
  <pre><code>var result = switch (variable) {
     case 1: return &lt;somevalue&gt;;
     case 2: return &lt;someothervalue&gt;;
    }
  </code></pre>
  
  <p>Possible? (maybe I need <code>break</code> inside the cases, but it is a return...)</p>