I have a method with a Stream for input :
public void Export(Stream finalOutPutStream)
For test purposes, i call it with a memory stream, like this :
// When
_exporter.Export(new System.IO.MemoryStream());
But when, in the method, i want to write on this memory stream, i get a ObjectDisposedException.
This stream is not enclosed in a using statement, i do not call explicitely .Dispose().
What happened ?
Thanks :)
-- EDIT : my bad, the problem is from the third party writer (DotNetZip). The exception happens when i call zip.Save(new MemoryStream()). I will ask my questions on their forum. Sorry, and thanks for the help.
You can check stream availability using: CanRead
, CanSeek
, CanWrite
properties.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With