Reads the specified number of bytes from the current stream into a byte array and advances the current position by that number of bytes.
A byte array containing data read from the underlying stream. This might be less than the number of bytes requested if the end of the stream is reached.
System.IO.BinaryReader does not restore the file position after an unsuccessful read operation.
For a list of common I/O tasks, see Common I/O Tasks.