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

Josh Sandlin
Josh Sandlin
673 Points

Neither idea is working

I see two ways to do this, given both what has been shown of C# and what has been seen in the other questions.

Simply writing:

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

does not work. Nor does:

class Program
{
    static void Main ()
    {
        System.Console.Write("Enter a book title:");
    }
}

Not entirely sure why this is, as both cases seem like they should be OK

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

2 Answers

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,077 Points

I am pretty sure it is the fact that you do not have a space after the colon. If the instructor provides the string for you, copy it exactly (whitespace and all) otherwise the testing framework they use will freak out!

Steven Parker
Steven Parker
231,210 Points

Your first try would have worked except you are missing a space after the colon.

I tried pasting your code in the challenge and it gave me this hint: "Bummer! Make sure to use the exact message from the instructions. Note the trailing space. Copy/paste if you like!"