Home > DeveloperSection > Interviews > What does a break statement do in switch statements?

Posted on    November-13-2013 11:13 PM

 C# C# 
Ratings:
 1 Answer(s)
  1078  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Points:3910
Posted on    November-13-2013 1:00 AM

The break statement terminates the loop in which it exists. It also changes the flow of the execution of a program.

In switch statements, the break statement is used at the end of a case statement. The break statement is mandatory in C# and it avoids the fall through of one case statement to another.


Don't want to miss updates? Please click the below button!

Follow MindStick