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 trialAditya Sheode
1,291 PointsHow?
Console.Write("Enter the amount of time excercised or type \"quit\" to exit: ");
string entry = Console.ReadLine();
I am not understanding how the line is being read out because in languages such as java we add beyong readline help please
3 Answers
Alexander Davison
65,469 PointsHmm... I don't really understand your question very well, but I did notice that you used a lowercase s for "string". Try typing a uppercase s instead. Here:
Console.Write("Enter the amount of time excercised or type \"quit\" to exit: ");
String entry = Console.ReadLine();
Hope it helps :)
Hugo da Silva Ribas
7,666 PointsHi
The MSDN site states that:
Console.ReadLine Method ()
"Reads the next line of characters from the standard input stream."
Now, by 'standard input stream', it usually means the keyboard.
So, in our case.
The method is reading whatever the user wrote with his keyboard to the console.
Different from what you said about java(which i don't know btw) in C#(witch i only know for a week now) if you want to write(output) something(like a question) you would use Console.Write()
Now, if your question is where exactly the information goes when you use Console.Readline(), that i do not really know.
Hope this website helps:
[example link]https://msdn.microsoft.com/en-us/library/system.console.readline(v=vs.110).aspx
Aditya Sheode
1,291 Pointsumm in java If we want to read out a line to the console we say Console.Readline("the message here"); like that... but here readline brackets are blank.. My question is how exactly the time excercised message is being read out to the console??
Aditya Sheode
1,291 PointsAditya Sheode
1,291 PointsHey alex no no my question is how exactly does ReadLine read the Console.Write message
Alexander Davison
65,469 PointsAlexander Davison
65,469 Pointswhat? I don't understand your question. Can you explain it in more detail?