Error handling for input in c#
double number; Console.Write("Enter the cost of the item: "); while (!double.TryParse(Console.ReadLine(), out number)) { Console.Write("This is not valid input. Please enter an integer value: "); }
double number; Console.Write("Enter the cost of the item: "); while (!double.TryParse(Console.ReadLine(), out number)) { Console.Write("This is not valid input. Please enter an integer value: "); }