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

Darren Gregory
Darren Gregory
826 Points

What am I doing wrong here?

Hi, I got stuck on the last one because of a space, and now I'm not sure what I've done wrong on the second part of the test. I've re-watched the video but it's gotten to the point where my brain isn't working through this anymore. I've gone through different posts relating to similar exercises but I don't think there's one for this one.

If anyone could provide just enough of a hint as to what I'm doing wrong to be able to solve it. Not looking to copy and paste the awnser.

Thankyou everyone!

CodeChallenge.cs
string firstName;

firstName = console.Readline();

string entry = Console.Readline();

Console.WriteLine(firstName);

2 Answers

andren
andren
28,558 Points

The hints i'll give is that your solution contains one line of code that the challenge never asked you to write, including code not explicitly asked for will often cause problems. So look at what the challenge text actually asks for and compare that to the code written. The second hint is that you have two typos in your second line of code, which has to do with capitalization of certain words.

Darren Gregory
Darren Gregory
826 Points

Thankyou, that's just about the level of detail I was after

Darren Gregory
Darren Gregory
826 Points

Did it, literally was telling me what to do in the question! Thank you for the help everyone

Junjie Huang
Junjie Huang
4,704 Points
string firstName = Console.ReadLine();

You should use 'Console', not 'console'. You should use 'ReadLine', not 'Readline'.

Darren Gregory
Darren Gregory
826 Points

Thanks that's a good general tip that still allows me to learn cheers.