title: Detecting SINGLE key presses in CONSOLE C#
body: <p>I'm new to coding and have decided to start with C#. I've decided to write a simple console program that will detect key press and if only Enter is pressed, it will show number. The problem is that you can just hold down key and it will continue to show numbers. What should I add to my code so program will detect only <em>SINGLE</em> presses and ignore if user is <em>HOLDING</em> the key?
  (I didn't find anything about this issue for <em>CONSOLE</em> <code>C#</code>, only for Forms one. Neither on this forum, nor in Web at all)  </p>
  
  <p>Thanks in advance</p>
  
  <pre><code>static void Main(string[] args)
  {
      Console.WriteLine("Press Enter to play!");
  
      int num = 0;
      void WaitForKey(ConsoleKey key)
      {
          while (Console.ReadKey(true).Key != key)
          { }
      }
  
      for (int i = 0; i &lt; 10; i++)
      {
          WaitForKey(ConsoleKey.Enter);
          Console.Write("{0} ", num);
          num++;
      }
  }
  </code></pre>