Conversation
…it flush removal Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove implicit flush from BufferedStream.WriteByte
Add breaking change documentation for BufferedStream.WriteByte implicit flush removal in .NET 10
Oct 13, 2025
gewarren
approved these changes
Oct 14, 2025
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR documents a breaking change in .NET 10 Preview 4 where BufferedStream.WriteByte no longer performs an implicit flush when the internal buffer is full, aligning its behavior with other Write methods in the BufferedStream class.
Key changes:
- Added comprehensive breaking change documentation explaining the behavioral change and migration guidance
- Created compilable code snippets in both C# and Visual Basic demonstrating the previous behavior and migration path
- Updated the table of contents and index to include the new breaking change entry
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.md | Main documentation file describing the breaking change, previous/new behavior, and migration guidance |
| docs/core/compatibility/core-libraries/10.0/snippets/bufferedstream-writebyte-flush/csharp/Program.cs | C# code examples demonstrating the behavioral change and recommended migration |
| docs/core/compatibility/core-libraries/10.0/snippets/bufferedstream-writebyte-flush/csharp/BufferedStreamWriteByteFlush.csproj | Project file for C# code snippets |
| docs/core/compatibility/core-libraries/10.0/snippets/bufferedstream-writebyte-flush/vb/Program.vb | Visual Basic code examples demonstrating the behavioral change and recommended migration |
| docs/core/compatibility/core-libraries/10.0/snippets/bufferedstream-writebyte-flush/vb/BufferedStreamWriteByteFlush.vbproj | Project file for Visual Basic code snippets |
| docs/core/compatibility/toc.yml | Added TOC entry for the breaking change under Core .NET libraries |
| docs/core/compatibility/10.0.md | Added index table entry for the breaking change |
BillWagner
approved these changes
Oct 14, 2025
Member
BillWagner
left a comment
There was a problem hiding this comment.
After updating to .NET 10, this looks great.
...ries/10.0/snippets/bufferedstream-writebyte-flush/csharp/BufferedStreamWriteByteFlush.csproj
Outdated
Show resolved
Hide resolved
...ibraries/10.0/snippets/bufferedstream-writebyte-flush/vb/BufferedStreamWriteByteFlush.vbproj
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds documentation for a breaking change in .NET 10 Preview 4 where
BufferedStream.WriteByteno longer performs an implicit flush when the internal buffer is full.Changes
New documentation file:
docs/core/compatibility/core-libraries/10.0/bufferedstream-writebyte-flush.mdWriteBytewould automatically flush the bufferWritemethodsCode snippets: Created compilable C# and Visual Basic examples demonstrating:
snippets/bufferedstream-writebyte-flush/csharp/andsnippets/bufferedstream-writebyte-flush/vb/TOC and index updates:
toc.ymlunder Core .NET libraries (alphabetically ordered)10.0.mdindex with the breaking change entryContext
This change aligns
BufferedStream.WriteBytebehavior with otherWritemethods in theBufferedStreamclass (WriteandWriteAsync), which don't perform implicit flushes. The inconsistency could lead to unexpected performance issues or unintended side effects when working with streams sensitive to flush operations.Fixes #496356
References
Original prompt
Fixes #48913
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews