No overload method for readline takes 1 argument | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

No overload method for readline takes 1 argument

I get this error when i try to run my code and i don't get why... Console.Write("Skriv in ditt mönsterdjup i millimeter: "); string inmatat = Console.ReadLine(); int djupMönster = int.Parse(inmatat); if (djupMönster < 1.6) { Console.WriteLine("Dina däck är olagliga!"); } else { Console.WriteLine("Du har " + (djupMönster - 1.5) + " mm kvar innan du måste byta däck!"); Console.WriteLine("Tryck på enter för att stänga av!"); Console.ReadLine("");

3rd Dec 2016, 7:30 PM
Linus Eriksson
Linus Eriksson - avatar
1 Answer
+ 3
why are you passing an empty string into ReadLine method? edit last line to: Console.ReadLine();
3rd Dec 2016, 8:54 PM
HAL8999++;
HAL8999++; - avatar