SequenceReader<T>.TryPeek 方法

定义

重载

TryPeek(T)

查看下一个值,而不前移读取器。

TryPeek(Int64, T)

查看指定偏移量处的下一个值,而不前移读取器。

TryPeek(T)

Source:
SequenceReader.cs
Source:
SequenceReader.cs
Source:
SequenceReader.cs

查看下一个值,而不前移读取器。

public:
 bool TryPeek([Runtime::InteropServices::Out] T % value);
public readonly bool TryPeek (out T value);
member this.TryPeek : 'T -> bool
Public Function TryPeek (ByRef value As T) As Boolean

参数

value
T

下一个值,或默认值(如果在读取器末尾)。

返回

如果读取器未在其末尾且查看操作成功,则为 true;如果在读取器末尾,则为 false

适用于

TryPeek(Int64, T)

Source:
SequenceReader.cs
Source:
SequenceReader.cs
Source:
SequenceReader.cs

查看指定偏移量处的下一个值,而不前移读取器。

public:
 bool TryPeek(long offset, [Runtime::InteropServices::Out] T % value);
public readonly bool TryPeek (long offset, out T value);
member this.TryPeek : int64 * 'T -> bool
Public Function TryPeek (offset As Long, ByRef value As T) As Boolean

参数

offset
Int64

当前位置的偏移量。

value
T

下一个值,或默认值(如果在读取器末尾)。

返回

如果读取器未在其末尾且查看操作成功,则为 true;如果在读取器末尾,则为 false

适用于