What is Convert.ToInt32(Console.ReadLine()) Method In C#
October 28th, 2007
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());

Console.Write(“\nfor Example: “);
for (t = 0; t