0

what would be an application example of the switch

26th Sep 2016, 5:44 PM
Aviwe
4 Answers
+ 1
A result grading
27th Sep 2016, 9:53 AM
Ahmad Abdul-Aziz
Ahmad Abdul-Aziz - avatar
+ 1
it's just like "if else"
26th Oct 2016, 2:32 AM
∆Gusta∆
0
void DoCommand(string command) { switch (command.ToLower()) { case "run": DoRun(); break; case "save": DoSave(); break; case "quit": DoQuit(); break; default: InvalidCommand(command); break; } }
27th Sep 2016, 11:08 PM
Zachary Blubaugh
Zachary Blubaugh - avatar
- 1
great
28th Sep 2016, 4:43 AM
Aviwe