Getting an error in Console I/0
So trying to figure out how to debug this line of code.
CODE: string bookTitle = System.Console.Readline(bookTitle);
something to do with System.Console.Readline()
System.Console.Write("Enter a book title: "); string bookTitle = System.Console.Readline(bookTitle);
Jennifer NordellTreehouse Staff
Hi there, Michael Craig ! I received your request for assistance. You're definitely on the right track. The error you're receiving is that there is no definition for the
Readline method. And it's correct. There is however, a definition for the
ReadLine method. Note the capitalization on the "L". Assume going forward that literally everything in programming will be case-sensitive. When you fix that, you will still have an error because the
ReadLine() method takes no arguments. This means that the parentheses should be empty.
string bookTitle = System.Console.Readline(bookTitle);
But that should be:
string bookTitle = System.Console.ReadLine();
Hope this helps!