Since DICOMBinaryWriter closes stream on Dispose it's hard to use it with MemoryStream
i want to write Dicom file in one class and read the result in other.
In order to make it possible one more cstor could be added to DICOMBinaryWriter
public DICOMBinaryWriter(Stream stream, bool leaveOpen)
{
this._writer = new BinaryWriter(stream, Encoding.UTF8, leaveOpen);
}
(since BinaryWriter supports such behavior )
Since DICOMBinaryWriter closes stream on Dispose it's hard to use it with MemoryStream i want to write Dicom file in one class and read the result in other. In order to make it possible one more cstor could be added to DICOMBinaryWriter public DICOMBinaryWriter(Stream stream, bool leaveOpen) { this._writer = new BinaryWriter(stream, Encoding.UTF8, leaveOpen); } (since BinaryWriter supports such behavior )