Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,021 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
218,639 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!"