This is not a duplicate of this question : VB.NET Stacking Select Case Statements together like in Switch C#/Java. The answer provided here does not answer my question. The answer there is stating that there is an automatic break in VB .Net, which I'm aware of. I'm asking if there's any workaround.
In C, it is possible to do something like this :
int i = 1;
switch (i) {
case 1 :
//Do first stuff
break;
case 2 :
//Do second stuff
//Fall Through
case 3 :
//Do third stuff
break;
}
Basically
- If
i
is 1, app will do first stuff. - If
i
is 2, it will do second AND third stuff. - If
i
is 3, it will do only third stuff.
Since there is an auto break at the end of each Select case
statement in VB .Net, does anyone know how to achieve this in VB .Net ?
In a nice and pretty way I mean...