How to take a stringbuilder and convert it to a stream?
SO my stringbuilder has to be converted into a :
StreamReader stream = ????
Update
I tried using a stringreader like:
StringReader sr = new StringReader(sb.ToString());
StreamReader stream = new StreamReader(sr);
but that doesn't work?
Use ToString to convert the StringBuilder into a String, and use a StringReader to wrap the String as a Stream.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With