Edit

Share via


Reader<TInput>.TryReadBytes(Int32, ReadOnlySpan<Byte>) Method

Definition

Tries the read the specified number of bytes from the input.

public bool TryReadBytes (int length, out ReadOnlySpan<byte> bytes);
member this.TryReadBytes : int * ReadOnlySpan -> bool
Public Function TryReadBytes (length As Integer, ByRef bytes As ReadOnlySpan(Of Byte)) As Boolean

Parameters

length
Int32

The length.

bytes
ReadOnlySpan<Byte>

The bytes which were read.

Returns

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

Applies to