Tag Archives: C# Switch Statement

C# – Understanding the Switch Statement

Think: train switch… logic based on evaluation of a variable or property value.

switch(whatIDo){
  case Occupation.Doctor;
   ......
   break;
  case Occupation.Lawyer;
   .....
   goto case Occupation.Doctor;
  default:
   break;
}