avirk avirk - 21 days ago 8
C# Question

Difference between Console.Read() and Console.ReadLine()?

I'm new to this field and I'm very confused: what is the real difference between

Console.Read()
and
Console.ReadLine()
?

Answer

Console.Read() reads only the next character from standard input, and Console.ReadLine() reads the next line of characters from the standard input stream.

Standard input in case of Console Application is input from the user typed words in console UI of your application. Try to create it by Visual studio, and see by yourself.