I try to use File.ReadAllBytes(FilePath) but it throw Exception of type 'System.OutOfMemoryException'
anybody can help me
I try to use File.ReadAllBytes(FilePath) but it throw Exception of type 'System.OutOfMemoryException'
anybody can help me
using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
byte[] buffer = new byte[fs.Length];
int bytesRead = fs.Read(buffer, 0, buffer.Length);
}
The above works well: