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

william maref
william maref
180 Points

Why is my answer wrong? string firstName = Console.Readline();

In my opinion it is really inefficient to ask everytime i made a mistake. I like the solution of codecademy a lot more. I mean there i could have checked the solution after trying multiple times and then understand my mistake and why i was wrong. Next time i would not do the same mistake again.

But at treehouse you have to guess thousands times and go into the wrong direction thousands times without getting any smarter. Or without knowing what you are doing is wrong. On top of that you loose so much time by asking these questions.

I mean: do i have to stop learning everytime i make a mistake and wait multiple hours for an answer?

I found at the answer myself. Mistake was ReadLine instead of Readline. All in all i lost 30 minutes for this simple mistake . Really efficient way of learning...

CodeChallenge.cs
string firstName = Console.Readline();

3 Answers

HIDAYATULLAH ARGHANDABI
HIDAYATULLAH ARGHANDABI
21,058 Points

Hello William, I am happy you have understand the answer. ThreeHouse excercises are some times hard to solve, but they are made with consideration and needs. Give small breaks and ask me your question i will try to answer in the nearest time. Try to use visual studio simultaneously, which will give you intelisense as you are write codes. it will tell you that you need to change your code when you make such a mistake. Visual studio is also supported by MAC.

string firstName = Console.ReadLine();
Steven Parker
Steven Parker
231,275 Points

I don't think you ever "have to stop learning", but you might need to use other resources. In this case, the challenge gave you a pretty specific error message: "Bummer: Are you calling the Console.ReadLine method?" Comparing that message to your original code should help to identify the spelling issue.

In later and more complex challenges, the "preview" button may be very helpful. It will show you the error messages directly from the compiler, which will have specific line and column references.

I do agree with you that repeated guessing is not a good strategy. And the forum is a great resource but you shouldn't need it constantly. And on those occasions where yo do need to ask a question, you can continue on to the next video(s) while you await an answer instead of stopping.

I hope that helps, and happy coding!

HIDAYATULLAH ARGHANDABI
HIDAYATULLAH ARGHANDABI
21,058 Points

TRY to use it in real IDE environment you will feel more comportable