title: Never ending while loop
body: <p>Here is example from one C# book:</p>
  
  <pre><code>//  Timer02.cs - Displaying Date and Time
  //      Using the Timer class. 
  //      Press Ctrl+C or 'q' folllwed by Enter to end program. 
  //------------------------------------------------------------
  using System;
  using System.Timers;
  
  class myApp
  {
      public static void Main()
      {
          Timer myTimer = new Timer();
          myTimer.Elapsed += new ElapsedEventHandler(DisplayTimeEvent);
          myTimer.Interval = 1000;
          myTimer.Start();
  
  
          while (Console.Read() != 'q')
          {
              ;    // do nothing...
          }
      }
  
      public static void DisplayTimeEvent(object source, ElapsedEventArgs e)
      {
          Console.Write("\r{0}", DateTime.Now);
      }
  }
  </code></pre>
  
  <p>I guess that it is supposed that loops runs until q is pressed, but when q is pressed loop is not ending.</p>
  
  <p>What I am missing here?</p>