Byte[stream.length] - out of memory exception, best way to solve?
问题 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