2

我收到此错误

There is not enough free memory to run this program. Quit one or more
programs, and then try again

同时将邮件保存在本地。

此错误通常发生在有超过 40000 封邮件的机器上。我不断地解析 40000 封邮件。

4

1 回答 1

3

不要使用 foreach - 将其转换为 oldschool

for (int counter = 1; counter <= Mapifolderfolder.items.Count; counter++)
{
   var item = Mapifolderfolder.items[counter];

   if ((item as MailItem) != null)
  { 
    .saveAs(filename+."msg")
   }
}
于 2012-11-07T15:18:31.080 回答