This project is read-only.

Compile InterIMAPConsoleTest on VS2010

Feb 25, 2011 at 5:50 PM

I downloaded the library, and am trying it out. VS2010 converts it, issuing various warnings about those /// comments being missing.

When I ran the InterIMAPConsole test program with my site's values, things went okay until this (line 49: Program.cs)

IMAPFolder f = client.Folders["INBOX"];

// Loop until a new message gotten
int[] msgCount = null;

// Fixes, but causes infinite loop until message arrives
//int[] msgCount = f.CheckForNewMessages();

while (msgCount.Length == 0)
{
     msgCount = f.CheckForNewMessages();
     Thread.Sleep(1000);
}

The null on the msgCount definition causes the program to throw an exception on the while condition a few lines down.

I replaced the null with the f.Check, and that seems to get the code to do what was intended. However, since the exception causes the Console Window output to pause, and fixing it causes the window to scroll indefinitely until I exit debug (causing the window to go away), I was actually better off with my study by putting the null back in! Anyway, I think you would want to fix it in the source.