The switch is a selection statement that chooses a single switch section to execute from a list of candidates based on a pattern match with the match expression.
The Code:

The Output of Your Program:

Notes:
A switch statement can include any number of cases. However, no two case labels may contain the same constant value.
The break; statement that ends each case will be covered shortly.
The default Case
In a switch statement, the optional default case is executed when none of the previous cases match.
The Code:

The Output of Your Program:

The break Statement
The break statement in C# has following two usage:
- When the break statement is encountered inside a loop, the loop is immediately terminated and program control resumes at the next statement following the loop.
- It can be used to terminate a case in the switch statement.
If you are using nested loops (i.e., one loop inside another loop), the break statement will stop the execution of the innermost loop and start executing the next line of code after the block.



