SequenceReader<T>.TryReadExact(Int32, ReadOnlySequence<T>) 方法

定义

尝试从当前序列中准确 count 读取值。

public:
 bool TryReadExact(int count, [Runtime::InteropServices::Out] System::Buffers::ReadOnlySequence<T> % sequence);
public bool TryReadExact (int count, out System.Buffers.ReadOnlySequence<T> sequence);
member this.TryReadExact : int * ReadOnlySequence -> bool
Public Function TryReadExact (count As Integer, ByRef sequence As ReadOnlySequence(Of T)) As Boolean

参数

count
Int32

要读取的值数。

sequence
ReadOnlySequence<T>

此方法返回时,如果 count 成功读取项,则包含读取数据。

返回

true 如果当前序列中存在 count 或更多剩余项,则为 。

适用于