From 38109c904b6a8583af49e0948ed9359bf76a3119 Mon Sep 17 00:00:00 2001 From: Nasif Ishtiaque Islam Date: Sat, 4 Oct 2025 05:18:17 +0600 Subject: [PATCH] Document position advancement in MemoryStream.WriteByte 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. --- xml/System.IO/MemoryStream.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xml/System.IO/MemoryStream.xml b/xml/System.IO/MemoryStream.xml index 1fa8f5acad6..030b2541297 100644 --- a/xml/System.IO/MemoryStream.xml +++ b/xml/System.IO/MemoryStream.xml @@ -2817,6 +2817,8 @@ The underlying buffer will not be exposed if the current `MemoryStream` instance ## Remarks This method overrides . + 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. + Except for a `MemoryStream` constructed with a byte[] parameter, write operations at the end of a `MemoryStream` expand the `MemoryStream`.