Skip to content

Fix documentation for ReadOnlySequence.GetOffset #116524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,15 @@ public SequencePosition GetPosition(long offset)
}

/// <summary>
/// Returns the offset of a <paramref name="position" /> within this sequence from the start.
/// Returns the offset of a <paramref name="position" /> within this sequence.
/// </summary>
/// <param name="position">The <see cref="System.SequencePosition"/> of which to get the offset.</param>
/// <returns>The offset from the start of the sequence.</returns>
/// <returns>The offset in the sequence.</returns>
/// <exception cref="System.ArgumentOutOfRangeException">The position is out of range.</exception>
/// <remarks>
/// The returned offset is not zero indexed from the start.
/// Subtract <code>mySequence.GetOffset(mySequence.Start)</code> from the returned offset to obtain the zero indexed offset.
/// </remarks>
public long GetOffset(SequencePosition position)
{
object? positionSequenceObject = position.GetObject();
Expand Down
Loading