25
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
int x = 10;
8
9
switch (x)
10
{
11
case 5:
12
Console.WriteLine("Value of x is 5");
13
break;
14
case 10:
15
Console.WriteLine("Value of x is 10");
16
break;
17
case 15:
18
Console.WriteLine("Value of x is 15");
19
break;
20
default:
21
Console.WriteLine("Unknown value");
22
break;
23
}
24
}
25
}
Cached Result
Value of x is 10