It's probably the same, as the IL will produce a jump statement of some
kind to move to the next iteration of the loop, which is the same thing the
continue is going to do.
It really shouldn't matter, unless you are doing this so many times and
you have identified this loop as being a bottleneck (while at the same time
identifying that the operations that are actually getting performed in the
loop are ^not^ bottlenecks).
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"lianqtlit" <li*******@discussions.microsoft.comwrote in message
news:30**********************************@microsof t.com...
Is using a jump statement more faster than using if statement
with a jump statement
example
for(int i=0; i < 10; i++)
{
if(a[i] == null)
{
continue;
}
a[i] =10;
}
or
no jump statement
example
for(int i=0; i < 10; i++)
{
if(a[i] !=null)
{
a[i] =10;
}
}