Understanding the concept of switch statement in C# when no condition is satisfied

Amatya
Posted by Amatya under C# category on | Points: 40 | Views : 443
In this case of switch statement no case will be executed and the switch case will come out
int a = 10;
switch (a)
{
case 1:
Console.WriteLine("Amatya");
break;
case 2:
Console.WriteLine("Agyey");
break;
}


Thanks
Amatya

Comments or Responses

Login to post response