how to convert System.IO.Stream into string and then back to System.IO.Stream

I don’t know what do you mean by converting a stream to a string. Also what’s the other side?

In order to convert a stream to a string you need to use an encoding. Here’s an example of how this could be done if we suppose that the stream represents UTF-8 encoded bytes:

using (var reader = new StreamReader(foo.UploadStream, Encoding.UTF8))
{
    string value = reader.ReadToEnd();
    // Do something with the value
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)