·  VB .NET – Syntax – Conditional Statements – Select...Case

 

- Info:

  - This tutorial shows how to use Select...Case conditional statements.

 

- Procedure:

  - Create VB .NET Console Application Test.vb

 

    Test.vb

    Module Module1

    

      Sub Main()

    

        Dim a = 7

    

         Select Case a

         Case 1

           MsgBox("Value is 1. Exit from Select.")

         Case 5

           MsgBox("Value is 5. Exit from Select.")

         Case Else

           MsgBox("Default value is selected if no case was true.")

         End Select

    

      End Sub

    

    End Module