Two related questions:
- Why did they choose to return
stringfromStreamReader.ReadToEnd()instead ofbyte[]? - I know I can convert it using
System.Text.Encoding, but exactly which encoding should I use? UTF8, UTF7, ASCII or Unicode? I'm dealing with binary files.
Note: I was asked for clarification. It is just that the word stream gives an impression of byte-level...well...stream of data (think network stream, file stream, buffer, none of them is supposed to be a char-type concept). As correctly indicated by Joel in his answer, this is more of a naming issue than anything else.