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
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.
Select Case parameter
Case "userID"
' does something here.
Case "packageID"
' does something here.
Case "mvrType"
If otherFactor Then
' does something here.
End If
Case Else
' does some processing...
Exit Select
End Select
Is there a reason for the goto? If it doesn't meet the if criterion, it will simply not perform the function and go to the next case.
Select Case parameter
' does something here.
' does something here.
Case "userID", "packageID", "mvrType"
' does something here.
If otherFactor Then
Else
goto case default
End If
Case Else
' does some processing...
Exit Select
End Select