Skip to content

Conversation

oii-nasif
Copy link
Contributor

Fixes #10163

Summary

  • Added documentation to MemoryStream.WriteByte to clarify that the method advances the stream's position by one
    byte upon successful write
  • Mirrors the documentation style used in the Write method for consistency

Details

The WriteByte() method documentation was missing information about position advancement, which was present in
the Write() method documentation. This omission could confuse developers about how the stream's position changes
when using this method.

Changes Made

Added the following clarification to the Remarks section:

If the write operation is successful, the current position within the stream advances by one byte. If an
exception occurs, the current position within the stream is unchanged.

This matches the documentation pattern used in Write() and provides developers with clear expectations about
position behavior.

Added documentation to clarify that WriteByte advances the tream's
  position by one byte on success, matching the documentation style of the Write method. This addresses confusion about position behavior.
@oii-nasif oii-nasif requested a review from a team as a code owner October 3, 2025 23:20
@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 Oct 3, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Oct 3, 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.

Position advancement is not mentioned
1 participant