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

Daniel Hunter
Daniel Hunter
4,622 Points

I can't understand why this code won't pass the task.

I have copied and pasted "Enter a book title: " as it says to do but it is still saying make sure it is written exactly like the question, I can't understand why it won't pass the task

CodeChallenge.cs
System.Console.Write()"Enter a book title: "

2 Answers

andren
andren
28,558 Points

You have to place the string within the parenthesis that follow the Write method in order to pass the string to the method. Also you have forgotten to place a semicolon after the method call, which is mandatory.

If you fix those two issues like this:

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

Then your code will work.

Daniel Hunter
Daniel Hunter
4,622 Points

hi Andren,

oh yeah, sorry I feel really stupid now! I tried this task yesterday and did have the semicolon but didn't put the string in the parenthesis. thank you.

Dan