0

Code coach issue with "Console.Readline()"

Hi All, I'm new here and I tried to solve my first challenge in a code coach. The app doesn't want me to use the "Console.Readline()" command arguing " 'Console' does not contain a definition for 'Readline' ". However this is the only command that I know (and learnt so far) to get a number thanks to : int = var.Convert.ToInt32(Console.Readline()); Does someone know how to help me (at least confirm that this is the right command to get an integer from the user)? Thans in advance folks for your help. K.

18th Jul 2020, 1:34 PM
Karim Ed.
Karim Ed. - avatar
2 Answers
+ 2
The format is like this: int x = Convert.ToInt32(Console.ReadLine()); https://www.sololearn.com/learn/CSharp/2585/ So you have a wrong syntax!
18th Jul 2020, 1:47 PM
Vasile Eftodii
Vasile Eftodii - avatar