Loop not executing
-
Hi, I was using visual studio 2005 before. Now I am using visual studio 2008. I got some problem with the loop execution. Well the project with the loop statements was working fine before but now in visual studio 2008, loop is not executing. I have a loop on a button click and only the loop is not even working. The piece of code i have on my button click is
protected void btnArchieve_Click(object sender, EventArgs e)
{for (int i = 0; i < gViewIndividualNames.Rows.Count; i++) { } }
I put the breakpoints in all the lines but I even checked my count value. Its 2 but still this loop is executing only once. Any ideas?
suchita
-
Hi, I was using visual studio 2005 before. Now I am using visual studio 2008. I got some problem with the loop execution. Well the project with the loop statements was working fine before but now in visual studio 2008, loop is not executing. I have a loop on a button click and only the loop is not even working. The piece of code i have on my button click is
protected void btnArchieve_Click(object sender, EventArgs e)
{for (int i = 0; i < gViewIndividualNames.Rows.Count; i++) { } }
I put the breakpoints in all the lines but I even checked my count value. Its 2 but still this loop is executing only once. Any ideas?
suchita
Without seeing what's in the for loop itself, no. If, however, there's a line in there that's incrementing i (e.g.
i++
), then that would explain it. Merely changing from VS2005 to VS2008 does not, by itself, change the fundamental nature of program applications. If I were you, I'd put a local watch on i and see what's happening to it as you step through the loop.Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Without seeing what's in the for loop itself, no. If, however, there's a line in there that's incrementing i (e.g.
i++
), then that would explain it. Merely changing from VS2005 to VS2008 does not, by itself, change the fundamental nature of program applications. If I were you, I'd put a local watch on i and see what's happening to it as you step through the loop.Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Hi, I was using visual studio 2005 before. Now I am using visual studio 2008. I got some problem with the loop execution. Well the project with the loop statements was working fine before but now in visual studio 2008, loop is not executing. I have a loop on a button click and only the loop is not even working. The piece of code i have on my button click is
protected void btnArchieve_Click(object sender, EventArgs e)
{for (int i = 0; i < gViewIndividualNames.Rows.Count; i++) { } }
I put the breakpoints in all the lines but I even checked my count value. Its 2 but still this loop is executing only once. Any ideas?
suchita