what does a break statement do in the switch


What does a break statement do in the switch statement?

The switch statement is a selection control statement that is used to handle many choices and transfer control to the case statements within its body. The following code snippet shows an example of the use of the switch statement in C#:.

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.

 

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: what does a break statement do in the switch
Reference No:- TGS0310765

Expected delivery within 24 Hours