Skip to content

Reader<TInput>.TryReadBytes(int, ReadOnlySpan<byte>)

TryReadBytes(int, ReadOnlySpan<byte>)

View source
public bool TryReadBytes(int length, out ReadOnlySpan<byte> bytes)
Tries the read the specified number of bytes from the input.

Parameters

lengthint
The length.
bytesReadOnlySpan<byte>
The bytes which were read.

Returns

true if the specified number of bytes were read from the input, false otherwise.