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 Say Hello!

Writing hello to the console in C#

I'm trying to do as the exercise is telling me, I'm writing the code as follows: System.Console.Write("Hello: ");

When I check my work it tells me to look at what I wrote between the parentheses and asks if I used a double quote. I copied this from the program that I wrote along with the video, the one I wrote along with the video worked just like Jeremy's did, but now this one wont work. What's the problem?

CodeChallenge.cs
System.Console.Write("Hello: ");

3 Answers

System.Console.Write("Hello");

Just Like Joseph said. The challenge is asking you print "Hello", not "Hello: ". You can just copy paste "Hello" into the parentheses.

Joseph Lesofski
PLUS
Joseph Lesofski
Courses Plus Student 1,511 Points

Not sure if I remember what the exercise is asking exactly but I think the problem is you have too much syntax in your string. Instead just write System.Console.Write("Hello");

Thanks guys, I don't understand why it didn't accept it the way I typed it out when the video before hand showed me otherwise.

Scott,

You're right. There should be some consistency here, but it does help teach that the challenge is looking for a specific output and putting in exactly what the previous video showed you to do isn't what it's asking you for. Anyone can copy/paste something to pass a challenge. You have to just follow the instructions. The challenge is asking for you to write "Hello" to the console.