C# Tutorial For Beginners: Break and Continue

Updated: Jan 18

The break and continue statements are reserved words in C#. Their primary use is in loops (and switch statements) to control the execution flow.


Break statement

The break statement ends the execution of a loop or a switch statement.

Continue statement

The continue statement is used to break one iteration in the loop based on a specified condition that if it occurs, the current loop cycle will end, and the next iteration of the loop will start.



20 views0 comments