C#- Getting error when trying to parse user input to int
问题 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: public void bet() { int betAmount; Console.WriteLine("How much would you like to bet?"); betAmount = int.Parse(Console.ReadLine()); Console.WriteLine(_chips - betAmount); } The program does not stop to wait for user input, and I don't know why this is? What can I do to get the program to wait for the user's input in this method? **I was running the program on Microsoft