Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Thadeus Gordon
550 PointsConsole I/O help
I don't really know what I'm doing wrong. Its wanting me to do something with the response or result, but I don't know how.
System.Console.Write("Enter a book title: ");
System.Console.Readline();
string bookTitle = "Neuromancer";
1 Answer

Steven Parker
221,297 PointsIt wants you to put the response coming in into your variable.
Calling ReadLine by itself doesn't really do anything. You need do something with the result, like assign it to a variable. Then you created the variable, but assigned it to a static string instead of the incoming result.
But if you move that second line down to replace that static string, you should have it.
Thadeus Gordon
550 PointsThadeus Gordon
550 PointsSo, you mean to put the string inside the parenthesis so the computer associates it with the code. I don't know, I found the Input/Output concept somewhat confusing.
Steven Parker
221,297 PointsSteven Parker
221,297 PointsFor task 2, you'll assign your variable (the last line up to the "="); but instead of a fixed string, you will assign it using what you currently have on the second line.
Don't worry about the I/O, just think of it as calling a method and assigning the result to a variable.
Thadeus Gordon
550 PointsThadeus Gordon
550 PointsI'm still really confused, I'm really sorry, but could you explain an example I/O process like this one this one, but in a series of steps. I think I might be able to understand if the whole I/O process is laid out tangibly in front of me.
Steven Parker
221,297 PointsSteven Parker
221,297 PointsLike I said, the I/O aspect isn't important here .. it's simple (one step) assignment from a method call:
string bookTitle = System.Console.Readline();