VB.NET Switch Statement GoTo Case

前端 未结 9 1010
你的背包
你的背包 2020-12-10 23:42

I am writing some code in VB.NET that uses a switch statement but in one of the cases it needs to jump to another block. In C# it would look like this:

switc         


        
9条回答
  •  长情又很酷
    2020-12-11 00:28

    Why don't you just refactor the default case as a method and call it from both places? This should be more readable and will allow you to change the code later in a more efficient manner.

提交回复
热议问题