c# - Is data “lost” when using binary data in a string?

后端 未结 9 1770
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-16 13:58

I\'ve tried reading a JPG file using the StreamReader class\' ReadToEnd() method which returns a string.

For some reason though, when I wri

9条回答
  •  暖寄归人
    2021-01-16 14:36

    You just can't do it this way.... Use FileStream instead.

    You cant use string to read binary files, some characters won't make its way as far as I know.

提交回复
热议问题