I have multiple foreach loops in my program which I want to break one of the inner loops at a certain met condition.
I know in Java you can give it some sort of label, and then when the condition is met you write break LabelName
Is there something similar to it in C#? I read there was something goto
but goto is pointing to go somewhere to continue performing methods rather than just breaking the loop.
Sample code in Java:
STOPLOOP : for(Clause c : clausesList)
{
// Random Coding
if(!l.solved(hasExcl))
{
literalCanBeRemoved = false;
c.complete = false;
break STOPLOOP
}