usr021986 usr021986 - 15 days ago 4
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[]?

Thanks

Answer

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