1 Always constructed by the Switch statement in C # to construct the IF statement when processing the string, because the Switch in the .NET IL also escapes the fate of C.
2 Process the number, and actually the C # compiler to the Switch statement to the string of the string so sweat.
3 First compile the following code:
4 using system;
5 Class Entrypoint 6 {7 private static void main () 8 {9 console.writeline ("Please enter the number: a, b, c, d, e, f"); 10 string szinput = console.readline (); 11 switch (szinput) 12 {13 case "a": 14 console.writeline ("You entered: a"); 15 Break; 16 17 case "B": 18 console.writeline ("You entered: b") 19 Break; 20 21 Case "C": 22 console.writeline ("You entered: C"); 23 Break; 24 25 Case "D": 26 console.writeline ("You entered: a") 27 Break; 28 29 Case "E": 30 console.writeline ("You entered: e"); 31 Break; 32 33 Case "f": 34 console.writeLine ("You entered: f") ; 35 Break; 36 37 Default: 38 console.writeline ("You entered: {0}", Szinput); 39 Break; 40} 41 console.read (); 42} 43} 44 45 Reflector The program is compiled above, the following is the complexed code 46 private static void main () 47 {48 console.writeLine ("/ U8BF7 / U8F93 / U5165 / U5E8F / U53F7: A, B, C, D, E , f "); 49 string text1 = console.readline (); 50 string text2 = text1; 51 if (text2! = null) 52 {53 int Num2; 54 if (