The next character from the input stream, or negative one (-1) if there are currently no more characters to be read.
Type Reason System.IO.IOException An I/O error occurred.
The Console.Read method blocks its return while you type input characters; it terminates when you press the ConsoleKey.Enter key. Pressing Enter appends a platform-dependent line termination sequence to your input (for example, Windows appends a carriage return-linefeed sequence). Subsequent calls to the Console.Read method retrieve your input one character at a time. After the final character is retrieved, Console.Read blocks its return again and the cycle repeats.
Note that you will not get a property value of -1 unless you perform one of the following actions: simultaneously press the ConsoleModifiers.Control modifier key and ConsoleKey.Z console key (Ctrl+Z), which signals the end-of-file condition; press an equivalent key that signals the end-of-file condition, such as the F6 function key in Windows; or redirect the input stream to a source, such as a text file, that has an actual end-of-file character.
The Console.ReadLine method, or the Console.KeyAvailable property and Console.ReadKey method are preferable to using the Console.Read method.