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

Jorge Kalil
Jorge Kalil
1,832 Points

bug

how do I get past a bug

CodeChallenge.cs
string firstName = "Jorge";
System.Console.Write( firstName );

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Hey Jorge,

I just went through all three tasks, and there is no bug - all tasks passed for me.

With the code you posted, the challenge never asked you to hard-code a value into the firstName variable, so your line of code, although correct in syntax, is not what the challenge is asking for.

One other thing I notice, is your Console.Write ... this is incorrect syntax. The correct method name is Console.WriteLine.

Have a another go, but read the instructions very carefully, as challenges are extremely picky and precise. And watch for the syntax errors.

Keep Coding! :)

:dizzy:

Your first line should not have a hard coded value (e.g. "Jorge"), instead you need to make a call to the Console.ReadLine() method and input that value into the string firstName.

You second line is supposed to call the Console.WriteLine() method with the variable firstName as the argument.