BinaryReader.ReadExactly(Span<Byte>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reads bytes from the current stream and advances the position within the stream until the buffer is filled.
public:
virtual void ReadExactly(Span<System::Byte> buffer);
public virtual void ReadExactly(Span<byte> buffer);
abstract member ReadExactly : Span<byte> -> unit
override this.ReadExactly : Span<byte> -> unit
Public Overridable Sub ReadExactly (buffer As Span(Of Byte))
Parameters
A region of memory. When this method returns, the contents of this region are replaced by the bytes read from the current stream.
Exceptions
The stream is closed.
An I/O error occurred.
The end of the stream is reached before filling the buffer.
Remarks
When buffer is empty, this read operation will be completed without waiting for available data in the stream.