title: How to get keypress event in console for different keys
body: <p>I tried googling this but I can't find an answer to this (hope it isn't just my bad searching skills). But what I currently have is this:</p>
  
  <pre><code>static void Main(string[] args)
      {
  
          while (xa == true)
          {
  
                  switch (switchNum)
                  {
                      case 0:
                          Console.WriteLine("Text");
                          break;
                      case 1:
                          Console.WriteLine("Stuff");
                          break;
                      case 2:
                          Console.WriteLine("More Stuff");
                          break;
                  }       
  
          }
  </code></pre>
  
  <p>And what I want to know is how to change the switchNum when I press a key. Hopefully 3 different keys for each case. </p>
  
  <p>EDIT: Clarification</p>
  
  <p>So currently it will type out of the console like this:</p>
  
  <pre><code>Text
  Text
  Text
  Text
  Text
  Text
  </code></pre>
  
  <p>And I want it to change to something else when I press a key e.g. "w"</p>
  
  <pre><code>Text
  Text
  Text
  Text
  //Press w here
  Stuff
  Stuff
  Stuff
  Stuff
  //Pressing another key e.g. q
  More Stuff
  More Stuff
  More Stuff
  ...
  </code></pre>
  
  <p>So what I don't know is how to receive different keys, and to keep the loop going (therefore, readkey() might not work).</p>
  
  <p>Thanks in advance!</p>