The only thing I can think of is to put the nested loops into their own method, and if the appropriate condition is met, simply return from the method.
private void LooperMethod()
{
for (int i = 0; i < somevalue; i++)
{
for (int j = 0; j < someOtherValue; j++)
{
if (conditionExists)
{
if (specialConditionExists)
{
return;
}
break;
}
if (outerConditionExists)
{
break;
}
}
}
}
If you can't abstract the loop code into its own method, your only real choice is to maintain a variable that indicates when to break the outer loop:
bool breakOuter = false;
for (int i = 0; i < somevalue; i++)
{
for (int j = 0; j < someOtherValue; j++)
{
if (conditionExists)
{
if (specialConditionExists)
{
breakOuter = true;
}
break;
}
if (outerConditionExists || breakOuter)
{
break;
}
}
}