title: proper razor syntax for switch statement inside foreach
body: <p>I am having a heck of a time trying to find the proper syntax for creating a switch statement inside a foreach loop on my mvc view page.</p>
  
  <p>Here is the latest attempt (after many others) I have so far but the the Razor engine won't accept it. Here the error is right at the <code>@foreach</code> and indicates it is missing a closing <code>}</code></p>
  
  <pre><code>@foreach (var item in Model) {
  
      String s = item.RegistrationStatus.ToString();
  
      // Make sure this mirrors values in RegistrationStatus enum!
      switch (s)
      {
          case "New": 
              &lt;tr class='info'&gt;
                  break;
  
          case "Arrived": 
              &lt;tr class='success'&gt;
              break;
  
          default:
              &lt;tr&gt;
  
      }
  
  
  ......
  
  }
  </code></pre>