Search⌘ K
AI Features

Jump Statements

Explore how jump statements such as break, continue, return, and throw are used in C# to control program flow within loops. Understand their effects on loop execution and exception handling, preparing you to write clearer and more effective code.

We'll cover the following...

A jump statement can be used to transfer program control using keywords such as break, continue, return, and throw.

break

A break statement is used to exit from a case in a switch statement and also used to exit from

  • for
  • foreach
  • while
  • do-while

loops that ...