Int n=int.parse(console.ReadLine()); | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Int n=int.parse(console.ReadLine());

Why "parse" do not work here ?

13th Jan 2017, 3:54 PM
Ahmad Reda Hashim
Ahmad Reda Hashim - avatar
4 Answers
+ 3
try this: int n = Int32.Parse(Console.ReadLine()); //also ensure uppercase/lowercase is correct)
13th Jan 2017, 4:04 PM
ifl
ifl - avatar
+ 3
l've just known the problem : it should be (Parse) not (parse) :-) Thank you.
13th Jan 2017, 6:22 PM
Ahmad Reda Hashim
Ahmad Reda Hashim - avatar
+ 2
of course it should work !!! what is the exception given ??
13th Jan 2017, 6:10 PM
Ihab Taleb
Ihab Taleb - avatar
+ 1
it is also error
13th Jan 2017, 4:08 PM
Ahmad Reda Hashim
Ahmad Reda Hashim - avatar