From MSDN on Console.Read
:
The Read method blocks its return while you type input characters; it terminates when you press the Enter key
So if I type, say, 1 it doesn't do anything - until I type enter. When I do that, Console.Read
returns the 1, but the enter is still buffered. When you use Console.ReadLine
, it fetches this buffered enter so exits immediately. You can see this by typing 123enter - the Read
fetches the 1 - and the ReadLine
fetches the remaining 23.
To avoid this buffering behavior, you might want to try Console.ReadKey
instead.