How do I get out of nested for or loop in vb.net?
I tried using exit for but it jumped or breaked only one for loop only.
How can I make it for the following:
for each item in itemList
for each item1 in itemList1
if item1.text = "bla bla bla" then
exit for
end if
end for
end for
Exit For item
variant of the statement, similar toNext item
. In the "good old days" you could explicitlyNext
the outer loop. Today, VB gives an error. Of course, it is more "constructive" toExit For
instead. – Surmullet