title: A switch expression or case label must be bool (or ...)
body: <p>Why this swich statement do not work, gives error:</p>
  
  <blockquote>
    <p>A switch expression or case label must be a bool, char, string, integral, enum, or corresponding nullable type</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code> switch (btn.BackColor)
   {
       case Color.Green:
           break;
       case Color.Red:
           break;
       case Color.Gray:
           break;
   }
  </code></pre>