D
David Veeneman
A project that I have been working on has stopped executing loops correctly.
I can add a simple loop to a class in the project, like this:
for (int i = 0; i < 5; i++)
{
Console.Write(i);
}
The 'for' line will execute, then the 'Console.Write()' line, and the focus
jumps to the 'i++' statement. However, the counter 'i' doesn't increment--
it remains at zero after the 'i++' statement is executed. The 'i < 5' still
evaluates to true, but the program immediately exits the loop, as if 'i' had
reached 5.
Has anyone else come across anything like this? Any suggestions on what it
might be? Thanks
David Veeneman
Foresight Systems
I can add a simple loop to a class in the project, like this:
for (int i = 0; i < 5; i++)
{
Console.Write(i);
}
The 'for' line will execute, then the 'Console.Write()' line, and the focus
jumps to the 'i++' statement. However, the counter 'i' doesn't increment--
it remains at zero after the 'i++' statement is executed. The 'i < 5' still
evaluates to true, but the program immediately exits the loop, as if 'i' had
reached 5.
Has anyone else come across anything like this? Any suggestions on what it
might be? Thanks
David Veeneman
Foresight Systems