i am trying to read the stream of bytes from a file. However when I try to read the bytes I get a
The function evaluation was disabled because of an out of memory exception
Quite straightforward. However, what is the best way of getting around this problem? Is it too loop around the length at 1028 at a time? Or is there a better way?
The C# I am using
BinaryReader br = new BinaryReader(stream fs);
// The length is around 600000000
long Length = fs.Length;
// Error here
bytes = new byte[Length];
for (int i = 0; i < Length; i++)
{
bytes [i] = br.ReadByte();
}
Thanks