It's used for writing debug information to the Immediate Window so that you can see what is taking place through each step (it has other purposes too, but that the simplest to explain). I put it in to see what 2 values it was comparing (that's how i realized you had the i += 1 in the loop). If you haven't learned it yet, you can remove it (your professor might not be happy seeing it there).

Here is a link to explain more.
http://msdn.microsoft.com/en-us/libr...writeline.aspx