Open E-School

Friday, February 24, 1984

Difference between Console.ReadLine() and Console.Read() methods in C#

Category: Programming Date: Sunday, March 22, 2015

Both Console.Read() and Console.ReadLine() methods are meant to read the user input from the console window. The major difference in both these methods is that Console.Read() will read one character at a time from the console whereas Console.ReadLine() reads one string at a time.

What both these methods return

Console.Read() returns the ASCII value of the key which is pressed from the keyboard.
Console.ReadLine() returns the complete string entered by the user from the keyboard.

Both these methods require the user to hit the enter key after entering the input

Rate this article and help us improve

Please Login to rate
Overall ratings: 0 | Rating: out of 5
Previous Article Next Article

Quick Links



Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..


Login to Open ESchool OR Create your account    Login   SignUp