本文介绍了如何避免System.OutOfMemoryException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当输入数据大小变大时,System.OutOfMemoryException总是出现在我的程序中。基本上我的程序使用Xceed DataGrid我试图将12列导出6000条记录到XPS Document。



if(xceeddataGrid.ExportToXps(stream,pageSize,imageableArea,pageRange) ,CompressionOption.SuperFast,ExporttoXPSCallback,true,false))



这里我得到OutOfMemoryException。我希望在使用ExporttoXPSCallBack时内存不足时取消导出。



请帮我解决。

A System.OutOfMemoryException always occurs in my program when the input data size becomes larger. Basically my program uses Xceed DataGrid i am trying to do Export 6000 records with 12 columns to XPS Document.

if(xceeddataGrid.ExportToXps(stream, pageSize, imageableArea, pageRange, CompressionOption.SuperFast, ExporttoXPSCallback, true, false))

Here i am getting OutOfMemoryException. i want to cancel export when memory is low using ExporttoXPSCallBack.

Please help me come out of it.

推荐答案


这篇关于如何避免System.OutOfMemoryException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 09:22