Quote:
Okay answered my own question... int.Parse
Instead of using int.Parse, I'd strongly suggest you use
int.TryParse[
^] - Parse will throw an exception (which will crash your app) is the user input is not a valid integer, TryParse won't. Since users have six thumbs on each hand, it's best not to rely on them always typing correctly!
int value;
do
{
Console.Write("Enter a number: ");
string userInput = Console.ReadLine();
} while (!int.TryParse(userInput, out value));