title: C#- Getting error when trying to parse user input to int
body: <p>I am new to c#, and I can't figure out why I keep getting a 'FormatException was unhandled' error when I run this method:</p>
  
  <pre><code>public void bet()
  {
      int betAmount;
  
      Console.WriteLine("How much would you like to bet?");
      betAmount = int.Parse(Console.ReadLine());
      Console.WriteLine(_chips - betAmount);
  } 
  </code></pre>
  
  <p>The program does not stop to wait for user input, and I don't know why this is?</p>
  
  <p>What can I do to get the program to wait for the user's input in this method? </p>
  
  <p>**I was running the program on Microsoft Visual C# 2010 Express as a console application.</p>