// switch..case with string
void StringSwitchCase()
{
string name = "Mahesh";
switch (name)
{
case "Mahesh":
Console.WriteLine("First name was used!");
break;
case "Chand":
Console.WriteLine("Last name was used!");
break;
default:
Console.WriteLine("No name found!");
break;
}
}