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

Cant get this

Cant get this

CodeChallenge.cs
string entry = System.Console.ReadLine();

System.Console.WriteLine(firstName);

string rocks;

System.Console.WriteLine("firstName" + entry + "rocks");

2 Answers

Damien Watson
Damien Watson
27,419 Points

Hi Joe,

The challenges are pretty specific, so if you don't follow correctly, you may not pass it.

The challenge should look like this:

string firstName = Console.ReadLine();

Console.WriteLine(firstName);

firstName = firstName+" rocks!";

Console.WriteLine(firstName);

Just put a whitespace at the beginning of "rocks". It's called concatenation.