using System;
public class Program
{
public static void Main()
int myNumber = 0;
switch (myNumber)
// A switch section can have more than one case label.
case 0:
case 1:
Console.WriteLine("Case 0 or 1");
break;
}
// Most switch sections contain a jump statement, such as a break, goto, or return.;
case 2:
Console.WriteLine("Case 2");
// 7 - 4 in the following line evaluates to 3.
case 7 - 4:
Console.WriteLine("Case 3");
// If the value of myNumber is not 0, 1, 2, or 3 the
//default case is executed.*
default:
Console.WriteLine("Default case. This is also optional");
break; // could also throw new Exception() instead