Is there any way to close a StreamWriter without closing its BaseStream?
问题 My root problem is that when using calls Dispose on a StreamWriter , it also disposes the BaseStream (same problem with Close ). I have a workaround for this, but as you can see, it involves copying the stream. Is there any way to do this without copying the stream? The purpose of this is to get the contents of a string (originally read from a database) into a stream, so the stream can be read by a third party component. NB : I cannot change the third party component. public System.IO.Stream