As a process control statement, switch has an irreplaceable position in various languages. Of course,. Net cannot be customized.
The differences between the switch and other languages in. NET are described in C:
1. No sequence. In C #, the discharge sequence of the Case clause is irrelevant. You can set the default clause to the beginning.
2. the compiler will mark the case clause without a break statement as an error. Special case: if the case clause is null, you can leave it empty.
3. If the first case clause in the block is activated, the subsequent case clause will not be activated, unless you use the GOTO statement to specifically mark the case clause to be activated (determined by 2 ). Special case: if a case clause is null, you can jump from this case to the next case, so that two or more case clauses can be processed in the same way (goto statements are not required)