An integer representing the next character to be read, or -1 if there are no characters to be read or if the stream does not support seeking.
Type Reason System.IO.IOException An I/O error occurred.
The StreamReader.Peek method returns an integer value in order to determine whether the end of the file, or another error has occurred. This allows a user to first check if the returned value is -1 before casting it to a char type.
This method overrides TextReader.Peek.
The current position of the System.IO.StreamReader object is not changed by StreamReader.Peek.