当进行大量操作后造成内存溢出(System.OutOfMemoryException)时,加代码:GC.Collect();
比如对文档各种操作后,马上读取数据库时报内存溢出,可在SQL语句前面加:GC.Collect();