异常信息:Exception of type 'System.OutOfMemoryException' was thrown.
引发当前异常的方法: Void zip(System.String, System.String, ICSharpCode.SharpZipLib.Zip.ZipOutputStream)
异常实例: 缺省
异常堆栈: at YIYOU.DAL.Zip.zip(String strFile, String StoreFile, ZipOutputStream s)
at YIYOU.DAL.Zip.ZipFilenew(String strFileFolder, String strZip)
at YIYOU.UI.UserFr.FrToolsEdit.ToolsAdd(String& Msg)
=======
以上是错误提示 ,环境为xp系统. 压缩超过500m的文件就抛该异常.
win7上压缩则不会 ,求帮助.
引发当前异常的方法: Void zip(System.String, System.String, ICSharpCode.SharpZipLib.Zip.ZipOutputStream)
异常实例: 缺省
异常堆栈: at YIYOU.DAL.Zip.zip(String strFile, String StoreFile, ZipOutputStream s)
at YIYOU.DAL.Zip.ZipFilenew(String strFileFolder, String strZip)
at YIYOU.UI.UserFr.FrToolsEdit.ToolsAdd(String& Msg)
=======
以上是错误提示 ,环境为xp系统. 压缩超过500m的文件就抛该异常.
win7上压缩则不会 ,求帮助.
using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.ReadWrite))
{ byte[] buffer = new byte[fs.Length];
}
在此句抛了异常 , byte[] buffer = new byte[fs.Length];
fs.length的单位为863571036抛出了内存溢出.请问如何解决