Summary:
Read(), ReadLine() and ReadKey() are basically static methods, and they comes
under the Console class. That's why we use these methods like:
Console.Read();
Console.Readline();
Console.ReadKey();
Now Lets see what is the differences in all these methods:
Console.ReadLine():-- method accept the String and return the string as well.
Console.Read():--method accept the String but return Integer.
Finally...
Console.ReadKey():--method accept the Character and return ASCII value of that character .
By,
Yogendra Kumar
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Prakash TripathiPosted Oct 25, 2014, 1:38 AM
Just to add that ReadLine gives the actual number/char entered in the keyboard where as Read gives it's ASCII counterpart.
pegah golestanehPosted Aug 24, 2013, 12:40 PM
Hi, I agree with Shantanu and SUNIL GUTTA about read and readline. i'm learning C# by myself, and I confront with read and readline, and searched it in google, and found this site.
SUNIL GUTTAPosted Jul 25, 2013, 2:45 PM
yup i agree with shanamu . may be a typo error in article .. please correct it .. cheers nice article
ShantanuPosted Jul 25, 2013, 5:45 AM
i think Console.Read():-- method accept the String and return int. Console.ReadLine():--method accept the String & return String . using console.read() value of "a" is 97 and using console.readline() value of "a" is "a".
knightsPosted Feb 1, 2011, 11:41 AM
Hey Kumar, It would be great idea to go through the article guidelines for this website and to rephrase the last paragraph if possible.Thanks