Curiosity question, and pretty simple.
Assuming I have a while
loop, and the last piece of code executed inside this loop is a switch
statement, should I finish my case
blocks with break
, or with continue
?
The result of the execution is virtually the same as far as I can tell. Is one of them faster? Are there weird edge cases?
while (ShouldLoop)
{
switch (myInt)
{
case 0:
doStuff();
break; // or continue?
default:
break; // that is the question.
}
}