·  VB .NET – Syntax – Conditional Statements – Do...While

 

- Info:

  - This tutorial shows how to use Do...While conditional statements.

 

- Procedure:

  - Create VB .NET Console Application Test.vb

 

    Test.vb

    Module Module1

    

      Sub Main()

    

        Dim i = 0

    

        'SIMPLE. Output is "1 2 3 4 5".

        Do

          i = i + 1

          MsgBox(i)

        Loop While i<=4

    

        'SIMPLE. Output is "1 2 3 4 5".

        i = 0

        Do While i<=4

          i = i + 1

          MsgBox(i)

        Loop

    

      End Sub

    

    End Module