Utf8JsonReader.HasValueSequence Property

Definition

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

public:
 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.

Remarks

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