0

In c# ... What is the difference between console.readline and console.read ?

Hi What is the difference between console.readline and console.read in c# While using visual studio it write that read is for int and readline is for string but when coding using console.read to read an integer it doesn't work !!

8/25/2019 9:43:04 PM

BlaCK DoT

3 Answers

New Answer

+3

Console.Read() reads only the next character from standard input, while Console.ReadLine() reads the next line of characters from the standard input. Standard input is input from the user-typed words in console UI of your application. Try to create it by Visual studio, and see by yourself.

+3

Console.Read() reads just a single character, while Console.ReadLine() reads all characters until the end of line.

0

Ty so much i will try