I've been banging my head against the wall for 25 minutes trying to figure out why I can't access the 'first' index of an array, which I was trying to do with array[0]. I kept getting an Array Index Out of Bounds Exception. Just to see what would happen, I tried using array[1]...and it worked. Perfectly. I have no idea why.
for (int i = 1; i < itemCounter+1; i++)
{
if (explorer.CurrentFolder.Items[i] is Outlook.MailItem)
{ //Do something }
}
The whole thing works fine. What's going on here?