Code For Switch Case /Select Case in VB.Net & C#

by Preetha 2012-09-14 16:22:45

C#:
switch (option)
{
case "option1":
// code for case "option1"
break;
case "option2":
// code for case "option2"
break;
default:
//code for every other options
break;
}

VB.NET:
Select Case option
Case "option1"
' code for case "option1"
Case "option2"
' code for case "option2"
Case Else
' code for every other options
End Select

Tagged in:

786
like
0
dislike
0
mail
flag

You must LOGIN to add comments