convert stream to string

G

Guest

I am getting data from an FTP into a Stream object. Now I need to put this
data into a string so I can manipulate it. Can anyone show me some example
code? (C# preferably)
 
J

Jon Shemitz

tparks69 said:
I am getting data from an FTP into a Stream object. Now I need to put this
data into a string so I can manipulate it. Can anyone show me some example
code? (C# preferably)


// Assuming "Stream Input" ...
Input.Position = 0;
using (StreamReader Reader = new StreamReader(Input))
return Reader.ReadToEnd();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top