title: How to read "Enter" from the keyboard to exit program
body: <p>I have written a simple program in C# in Visual Studio 2013.
  At the end of my program I instruct the user to:</p>
  
  <blockquote>
    <p>"Please Press Enter to Exit the Program."</p>
  </blockquote>
  
  <p>I would like to get the input from the keyboard on the next line and if <kbd>ENTER</kbd> is pressed, the program will quit.</p>
  
  <p>Can anyone tell me how I can achieve this function?</p>
  
  <p>I have tried the following code:</p>
  
  <pre><code>Console.WriteLine("Press ENTER to close console......");
  String line = Console.ReadLine();
  
  if(line == "enter")
  {
      System.Environment.Exit(0);
  }
  </code></pre>