Hi Harman,
C# does not support "continue <label>", instead use Goto (but only if you
really have to ;-)
example:
static void Foo()
{
int[] ArrayOne = new int[] { 1, 2, 3 };
int[] ArrayTwo = new int[] { 10, 20, 30 };
int[] ArrayThree = new int[] { 100, 200, 300 };
foreach(int i in ArrayOne)
{
Console.WriteLine(i);
foreach(int j in ArrayTwo)
{
Console.WriteLine(j);
foreach(int k in ArrayThree)
{
Console.WriteLine(k);
if (k >= 200)
{
goto done;
}
}
}
}
done: Console.WriteLine("We are done");
}
Regards,
Bennie Haelen
"Harman Sahni" <Ha*********@Hotmail.com> wrote in message
news:uY****************@TK2MSFTNGP09.phx.gbl...
As per this URL
http://msdn.microsoft.com/library/en...asp?frame=true
conitnue works on for, while, do... I know it works for foreach as well as
I'm using it somewhere.
My question is how do I "continue" (jump an iteration) of an outermost
loop from an inner loop.
So I have something like this:
foreach(foo)
{
foreach(blah blah)
{
for(i= gooo gooo)
{
continue; (I want this continue to jump an iteration of the
foreach(foo foo)
}
}
}
Thank you in anticipation!
Harman Sahni