C# Switch StatementC# does support Switch statement. if any case of the switch is met it will be executed.
C# Switch Rules:
- The switch expression is evaluated once
- The value of the expression is compared with the values of each case
- If there is a match, the associated block of code is executed
- The break and default keywords will be described later in this chapter
C# Switch Syntaxt
C# Switch Example
In this page (written and validated by A. Gawali) you learned about C# Switch Statement . What's Next? If you are interested in completing CS tutorial, your next topic will be learning about: CS For Loop.
Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue: email@example.com.