Okay, here's what I'm attempting.
I have a drop down list with all of the countries in the world. The user selects one, and that value is passed to a case statement, if it matches the case, an email is sent.
I only have four different recipents, but I can have upwards to dozens of countries to match with each one of the four emails. For example:
switch (selectedCountry)
{
case "ca":
sendTo = canadaEmail;
break;
case "uk":
case "de":
case "fr"
sendTo = europeanEmail;
break;
case "bb":
sendTo = barbadosEmail;
break;
default:
sendTo = usEmail;
break;
}
What I would like to know is, what's a better way of doing this rather than having one huge case statement?