// switchswitch(i){case0:CaseZero();break;case1:CaseOne();break;default:CaseOthers();break;}// case <constant or constant expressions>// case Foo foo// case Foo foo when foo.bar > 10// switch expression => C# 8+varresult=bank.Statusswitch{BankBranchStatus.Open=>true,BankBranchStatus.Closed=>false,BankBranchStatus.VIPCustomersOnly=>isVip};