M
Marko Rangel
I have the following code:
if (SqlDR != null)
{
while (SqlDR.Read())
{
feed indexfeed = ReturnInstance();
indexfeed.FeedID = new Guid(SqlDR["ID"].ToString());
m_feedarr.Add(indexfeed);
}
}
When i put a breakpoint on (or before) the while line (SqlDR.Read()) the
code will not step inside the while loop, and the Watch window shows the
SqlRD.Read() as true. As soon as I reach that line and step into the next
line, the SqlRead.Read() turns to false and skips over the entire while
loop.
If I put the breakpoint in the while loop, the execution will actually stop
at the breakpoint in the loop.
The question is, why is it that I cannot put a breakpoint before the .Read()
on the while loop and step into the loop, but I can put a breakpoint inside
the while loop and hit the breakpoint on the same queries?
TIA
if (SqlDR != null)
{
while (SqlDR.Read())
{
feed indexfeed = ReturnInstance();
indexfeed.FeedID = new Guid(SqlDR["ID"].ToString());
m_feedarr.Add(indexfeed);
}
}
When i put a breakpoint on (or before) the while line (SqlDR.Read()) the
code will not step inside the while loop, and the Watch window shows the
SqlRD.Read() as true. As soon as I reach that line and step into the next
line, the SqlRead.Read() turns to false and skips over the entire while
loop.
If I put the breakpoint in the while loop, the execution will actually stop
at the breakpoint in the loop.
The question is, why is it that I cannot put a breakpoint before the .Read()
on the while loop and step into the loop, but I can put a breakpoint inside
the while loop and hit the breakpoint on the same queries?
TIA