Do While Loop : Do While « Statements « VB.Net Tutorial






Option Strict On
 Imports System
 Module Module1

    Sub Main( )
       Dim counterVariable As Integer = 0

       Do While counterVariable < 10
          Console.WriteLine("counterVariable: {0}", counterVariable)
          counterVariable = counterVariable + 1
       Loop 

    End Sub 
 End Module
counterVariable: 0
counterVariable: 1
counterVariable: 2
counterVariable: 3
counterVariable: 4
counterVariable: 5
counterVariable: 6
counterVariable: 7
counterVariable: 8
counterVariable: 9








4.12.Do While
4.12.1.Do While Loop
4.12.2.Do While/Loop: multiplies and displays product while product is less than or equal to 1000
4.12.3.Exit Do While