共用方式為


ReaderInput.TryReadBytes(Int32, ReadOnlySpan<Byte>) 方法

定義

嘗試從輸入讀取指定的位元組數目。

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

參數

length
Int32

要讀取的位元組數目。

bytes
ReadOnlySpan<Byte>

已讀取的位元組。

傳回

true 如果已成功讀取位元組數,則為 , false 否則為 。

適用於