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 Formatting Output

chzevernchong
chzevernchong
2,845 Points

C# basic formatting output, challenge task 3 of 3 not working

I think i am correct but not sure what is the problem, please help..

CodeChallenge.cs
string firstName = Console.ReadLine();
Console.WriteLine(firstName +  rocks!);

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! Your code would be fine but you're using the incorrect type of quotation marks. These should be the quotation marks that go straight up and down.

You've typed: “ rocks!”

But it should be: " rocks!"

Hope this helps! :sparkles:

Henrik Christensen
seal-mask
.a{fill-rule:evenodd;}techdegree
Henrik Christensen
Python Web Development Techdegree Student 38,322 Points

Looks like you're doing 2x single quotes every time you want to do a double quote - but the code worked for me when using double quotes like this:

string firstName = Console.ReadLine();
Console.WriteLine(firstName + " rocks!");
chzevernchong
chzevernchong
2,845 Points

Thanks for helping me and it works for me, I do that because i copy and paste straight away from the question provided and I am not sure why he did that....haha :P