+ 3
"Convert.Tostring32(Console.ReadLine());" error
why playcode gives error
3 Answers
+ 5
If you want to convert to "int" then use
Convert.ToInt32(Console.ReadLine());
If you want to convert to "String" then use
Convert.ToString(Console.ReadLine());
+ 5
Console.ReadLine() returns a string no need to convert it again. And also there is no any method call Convert.Tostring32(), it's Convert.ToString()
+ 1
Thank you