Share via

Utf8JsonReader.HasValueSequence Property


Gets a value that indicates which Value property to use to get the token value.

 property bool HasValueSequence { bool get(); };
public bool HasValueSequence { get; }
member this.HasValueSequence : bool
Public ReadOnly Property HasValueSequence As Boolean

Property Value

true if ValueSequence should be used to get the token value; false if ValueSpan should be used instead.


If HasValueSequence is false, ValueSequence is empty. Therefore, read the token value using the ValueSpan property.

For input data within a ReadOnlySpan<byte>, this always returns false. For input data within a ReadOnlySequence<byte>, this only returns true if the token value straddles more than a single segment and hence can't be represented as a span.

Applies to