Switch Fall Through Not Working as Expected

This question already has an answer here:

  • Switch statement fallthrough in C#? 14 answers

  • In C# you must explicitly leave the case section in question. You can use goto case "MSI"; in the end of the first section.

    Of course a section of a switch block can also end with break , return , throw , an infinite loop (that the C# compiler can determine is infinite) and so on.

    链接地址: http://www.djcxy.com/p/84482.html

    上一篇: 使用if / else和switch之间是否存在显着差异?

    下一篇: 按预期切换失败