The method Console.ReadLine always reads the input from the user in the form of a string. To get an integer value from the user, this string needs to be converted to Integer. The Convert.ToInt32 does this.

Example Code:-

Console.WriteLine("Please enter a number");
int Num = Convert.ToInt32(Console.ReadLine());
Rating: 4.0/5. From 5 votes.
Please wait...