J
JC
Anybody knows what problem has this code? I think, in the Garbage
Collector? You know the Solution?
The program in the test's case, whit 350 contacts, run OK before number
86. The error is a "Array index out of bounds".
Microsoft.Office.Interop.Outlook._Application olApp = new
Microsoft.Office.Interop.Outlook.ApplicationClass();
Microsoft.Office.Interop.Outlook._NameSpace olNs =
olApp.GetNamespace("MAPI");
Microsoft.Office.Interop.Outlook.MAPIFolder aContacts =
olNs.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts);
Microsoft.Office.Interop.Outlook.Items oItems = aContacts.Items;
FAddressBookName = aContacts.AddressBookName;
foreach (Microsoft.Office.Interop.Outlook._ContactItem oContact in
oItems)
{
//do something
}
Collector? You know the Solution?
The program in the test's case, whit 350 contacts, run OK before number
86. The error is a "Array index out of bounds".
Microsoft.Office.Interop.Outlook._Application olApp = new
Microsoft.Office.Interop.Outlook.ApplicationClass();
Microsoft.Office.Interop.Outlook._NameSpace olNs =
olApp.GetNamespace("MAPI");
Microsoft.Office.Interop.Outlook.MAPIFolder aContacts =
olNs.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts);
Microsoft.Office.Interop.Outlook.Items oItems = aContacts.Items;
FAddressBookName = aContacts.AddressBookName;
foreach (Microsoft.Office.Interop.Outlook._ContactItem oContact in
oItems)
{
//do something
}