codeGK
Code it ALL
C# Switch - CodeGK
♦ C# Switch

♣ About C# Switch

Switch is also a conditional statement same as if-else.
Switch accepts a parameter, and based upon the parameter respective associated code block is executed.
There also exist a default statement code block, which is executed when none of the code block mathces with parameter.

♣ Example1: Switch in C#

In this example, Switch statment is executed on month of the year.
Example
Input:
Output:
Prev_Lesson
C# Switch