dotnet-api-docs
dotnet-api-docs copied to clipboard
Document position advancement in MemoryStream.WriteByte
Fixes #10163
Summary
- Added documentation to
MemoryStream.WriteByteto clarify that the method advances the stream's position by one byte upon successful write - Mirrors the documentation style used in the
Writemethod 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.