问题描述
Dim docContent()As Byte = File.ReadAllBytes(path:= CachedFilePath)
Dim docContent() As Byte = File.ReadAllBytes(path:=CachedFilePath)
我正在尝试将二进制文件读入字节数组。
我得到'System.OutOfMemoryException'。
我相信我需要设置循环并写入块
字节数组。一些vb代码将不胜感激。
I am trying to read binary files into a Byte array.
I get a 'System.OutOfMemoryException'.
I believe that I need to setup a loop and write chunks to the
byte array. Some vb code would be greatly appreciated.
谢谢
Tim
推荐答案
我正在尝试将二进制文件读入字节数组。
我得到'System.OutOfMemoryException'。
我相信我需要设置一个循环并写入块
字节数组。一些vb代码将不胜感激。
I am trying to read binary files into a Byte array.
I get a 'System.OutOfMemoryException'.
I believe that I need to setup a loop and write chunks to the
byte array. Some vb code would be greatly appreciated.
谢谢
这篇关于将大型二进制文件读入字节数组 - File.ReadAllBytes抛出'System.OutOfMemoryException'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!