Difference between Console.Read and Console.ReadLine in C#
In C#, to take input from the standard input device, the following method are used – Console.Read() and Console.ReadLine() method. Console is a predefined class of System namespace. While Read() and ReadLine() both are the Console Class methods.
The only difference between the Read() and ReadLine() is that Console.Read is used to read only single character from the standard output device, while Console.ReadLine is used to read a line or string from the standard output device.
Program 1: Example of Console.Read() in C#.
Program 2: Example of Console.ReadLine() in C#.
Geeks For Geeks
In the above code, program 1 shows that it will read only single character and program 2 shows it will read string until new line character is not found.