How to read all bytes of a file

Asked

Viewed 1,334 times

4

I have a question in Readbytes(int)

My code is like this:

BinaryReader r = new BinaryReader (File.OpenRead(ARQUIVO));

byte[] arraybyte = r.ReadBytes(100000);

That one 100000 which I put is because I don’t know the file size, as I can simply make it read all bytes of the file?

1 answer

4


Browser other questions tagged

You are not signed in. Login or sign up in order to post.