ReadOnlySequence<T>.GetOffset(SequencePosition) Method

Definition

Returns the offset of a position within this sequence from the start.

C#
public long GetOffset(SequencePosition position);

Parameters

position
SequencePosition

The SequencePosition of which to get the offset.

Returns

The offset from the start of the sequence.

Exceptions

The position is out of range.

Applies to

Product Versions
.NET 5, 6, 7, 8, 9