c# - What type of logic do I use in this situation? -
i'm coding console application , need add menu. understand basic if statements. how can transfer user different part of programs? sort of :
if (menuoption == 1) { // transfer menu option 1 }
what type of logic need use in circumstance ?
use switch menus
//user enters value. var menu = convert.toint32(console.readkey()); switch(menu) { case 1: //go menu 1 break; case 2: //go menu 2 break; }
Comments
Post a Comment