RecyclableMemoryStream.SafeReadByte method

December 6, 2023 · View on GitHub

Reads a single byte from the specified position in the stream.

public int SafeReadByte(ref long streamPosition)
parameterdescription
streamPositionThe position in the stream to read from.

Return Value

The byte at the current position, or -1 if the position is at the end of the stream.

Exceptions

exceptioncondition
ObjectDisposedExceptionObject has been disposed.

See Also