To convert Stream to string write the following code:
public string StreamToString(Stream stream)
{
stream.Position = 0;
using (StreamReader reader = new StreamReader(stream))
{
return reader.ReadToEnd();
}
}
public string StreamToString(Stream stream)
{
stream.Position = 0;
using (StreamReader reader = new StreamReader(stream))
{
return reader.ReadToEnd();
}
}
No comments:
Post a Comment