Case Statement Block Level Declaration Space in C#

前端 未结 5 1905
走了就别回头了
走了就别回头了 2020-11-29 12:18

Is there a reason I am missing that a block within a case statement isn\'t considered a block level declaration space?

I keep getting an error (variable has already

5条回答
  •  猫巷女王i
    2020-11-29 12:54

    Ah - you don't have fall through, but you can use goto to jump to another labelled case block. Therefore the blocks have to be within the same scope.

提交回复
热议问题