Continue Considered Harmful? [closed]
Should developers avoid using continue in C# or its equivalent in other languages to force the next iteration of a loop? Would arguments for or against overlap with arguments about Goto ? I think there should be more use of continue! Too often I come across code like: for (...) { if (!cond1) { if (!cond2) { ... highly indented lines ... } } } instead of for (...) { if (cond1 || cond2) { continue; } ... } Use it to make the code more readable! Is continue any more harmful than, say, break ? If anything, in the majority of cases where I encounter/use it, I find it makes code clearer and less