title: Switch case instead of if else
body: <p>How is it possible to switch this code into a <code>switch</code> case?</p>
  
  <pre><code>protected override void WndProc(ref Message m)
  {
      if (m.Msg == WM_HOTKEY &amp;&amp; (int)m.WParam == 1)
          Console.WriteLine("w");
      else if (m.Msg == WM_HOTKEY &amp;&amp; (int)m.WParam == 2)
          Console.WriteLine("a");
      else if (m.Msg == WM_HOTKEY &amp;&amp; (int)m.WParam == 3)
          Console.WriteLine("s");
      else if (m.Msg == WM_HOTKEY &amp;&amp; (int)m.WParam == 4)
          Console.WriteLine("d");
  
      base.WndProc(ref m);
  }
  </code></pre>
  
  <p>This is my last try and the line on the first case is again marked as red</p>
  
  <pre><code>switch (m.Msg)
  {
      case m.Msg == WM_HOTKEY &amp;&amp; (int)m.WParam == 1:
         Console.WriteLine("w");
         break;
      case m.Msg == WM_HOTKEY &amp;&amp; (int)m.WParam == 2:
         Console.WriteLine("a");
         break;
      case m.Msg == WM_HOTKEY &amp;&amp; (int)m.WParam == 3:
         Console.WriteLine("s");
         break;
      case m.Msg == WM_HOTKEY &amp;&amp; (int)m.WParam == 4:
         Console.WriteLine("d");
         break;
  }
  </code></pre>
  
  <p>Is this possible? I think it would look better to read inside a <code>switch</code> statement.</p>