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

Conversation

lilinus
Copy link
Contributor

@lilinus lilinus commented Jun 11, 2025

Fixes documentation for ReadOnlySequence.GetOffset to communicate that the returned value is not zero indexed.

Maybe this needs to be changed in https://github.com/dotnet/dotnet-api-docs too?

Related to #75866

@Copilot Copilot AI review requested due to automatic review settings June 11, 2025 10:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the XML documentation for ReadOnlySequence.GetOffset to clarify that its returned offset is not zero-indexed.

  • Removed explicit reference to “from the start” in the summary.
  • Added a remarks section explaining how to adjust the offset to obtain a zero-indexed value.
Comments suppressed due to low confidence (1)

src/libraries/System.Memory/src/System/Buffers/ReadOnlySequence.cs:533

  • The updated remarks clarify the non-zero indexing behavior; however, consider explicitly stating the indexing base or mentioning that this behavior is consistent with related APIs to avoid any ambiguity.
/// The returned offset is not zero indexed from the start.

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 11, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant