Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Basics (Retired) Console I/O Console I/O

Use the System.Console.Write() method to print "Enter a book title: " to the console.

help My Answer: System.Console.Write(" Enter a book title");

CodeChallenge.cs
System.Console.Write ("Enter a book title");
string bookTitle= System.Console.Readline("saif");

2 Answers

Three issues:

  • You are only printing the message "Enter a book title". You need to print "Enter a book title: " with a colon and a space at the end of the string. Code challenges are extremely picky!
  • You don't need to pass in any arguments to ReadLine(). You are doing Readline("saif"), remove the "saif" part!
  • You "misspelled" ReadLine as Readline. C# is case-sensitive, meaning that "A" and "a" are different letters. In this case, you used a lowercase L instead of an uppercase L!

I hope this helps :grin:

:dizzy: ~Alex :dizzy:

thanks so much for explaining

System.Console.Write ("Enter a book title");