Saving a stream to file

Posted by Loadman on Stack Overflow See other posts from Stack Overflow or by Loadman
Published on 2009-01-04T20:04:39Z Indexed on 2010/04/23 22:53 UTC
Read the original article Hit count: 227

Filed under:
|
|
|

Hi,

I have a StreamReader object that I initialized with a stream, now I want to save this stream to disk (the stream may be a gif or jpg or pdf etc).

SO my code so far is:

StreamReader sr = new StreamReader(myOtherObject.InputStream);
  1. I need to save this to disk (I have the filename).

  2. In the future I may want to store this to sqlserver

I have the encoding type also, which I will need if I store it to sql server right?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET