usr021986 usr021986 - 5 months ago 54
C# Question

Convert StreamReader to byte[]

I am getting the result streamreader object.

I want to convert the result into byte[].

How can i convert streamreader to byte[]?



A StreamReader is for text, not plain bytes. Don't use a StreamReader, and instead read directly from the underlying stream.