[ACCEPTED]-VB.NET Stacking Select Case Statements together like in Switch C#/Java-case-statement
Accepted answer
Your understanding is correct. VB will not 5 "fall through".
Specify a single 4 Case
and separate each expression with a comma:
Select Case Test
Case 11, 12, 13
MsgBox.Show("Could be 11 or 12 or 13?")
End Select
Alternatively, you 3 could use a range with the To
keyword to accomplish 2 the same thing:
Select Case Test
Case 11 To 13
MsgBox.Show("Could be 11 or 12 or 13?")
End Select
For more information, see 1 the documentation.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.