我有一个接收流使用的BinaryWriter它来写一个方法。但是,当我处理这个的BinaryWriter还关闭了流。我可以把它未予处置,所以我可以离开我的流开?
I have one method that receives a Stream to write on it using a BinaryWriter. But when I dispose this BinaryWriter it also closes the stream. Can I leave it undisposed so I can leave my stream open?
只是不调用Dispose,使用同花顺相反,它的安全。
Just do not call Dispose, use Flush instead, its safe.