最佳答案
迅捷有没有通过陈述? 例如,如果我这样做
var testVar = "hello"
var result = 0
switch(testVal)
{
case "one":
result = 1
case "two":
result = 1
default:
result = 3
}
有没有可能对情况“1”和情况“2”执行相同的代码?