Understanding the concept of switch statement in C#

Amatya
Posted by Amatya under C# category on | Points: 40 | Views : 309
Understanding the concept of switch statement in C#

int a = 1;
switch (a)
{
case 1:
Console.WriteLine("Dot Net Funda");
break;
case 2:
Console.WriteLine("Amatya");
Console.WriteLine(""Aditya");
break;
default:
Console.WriteLine("Its Default");
break;
}

Output :
Dot Net Funda

Thanks
Amatya

Comments or Responses

Login to post response