Basically I’m reading all the bytes from a file into a byte array using stream reader.
The array I have declared looks like this : byte[] array = new byte[256];
The size of the array 256 can read the whole bytes from the file? Saying that a file has 500 bytes instead of 256?
Or the each element from the array has the size 256 bytes?
You could use
File.ReadAllBytesinstead:or if you just want to know the size, with a
FileInfoobject:Edit: If you want to it “in a classical way” as commented:
(reflected via
ILSpy)