usr021986 usr021986 - 1 year ago 179
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[]?


Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download