在C#中使用switch语句与使用语句的好处/缺点是什么?if/else我无法想象除了你的代码外观之外还有其他重大差异.
switch
if/else
是否有任何理由导致生成的IL或相关的运行时性能完全不同?
.net c# switch-statement
.net ×1
c# ×1
switch-statement ×1