The BinaryWriter has no support for leaving the base stream open when the writer is disposed of. The writer will close the underlying stream regardless of intent.
The BinaryWriter should support the LeaveOpen option allowing for the writer to either flush the underlying stream when the option is true or close the underlying stream when the option is false.
This would be a breaking change. May be able to use project compatibility.
The
BinaryWriter
has no support for leaving the base stream open when the writer is disposed of. The writer will close the underlying stream regardless of intent.The
BinaryWriter
should support theLeaveOpen
option allowing for the writer to either flush the underlying stream when the option is true or close the underlying stream when the option is false.This would be a breaking change. May be able to use project compatibility.