If your in a method that returns a value, you can use the switch statement to return a value.
public static string GreetingMessage()
{
string ActivationCountry = "United States";
switch(ActivationCountry)
{
case "Canada":
return "Welcome to Canada";
case "United States":
return "Welcome to the United States";
default:
return "Welcome!";
}
}
This example shows you don't have to always use the break statement to jump out of the switch.