Do Loop While : Do While « Language Basics « VB.Net






Do Loop While

Do Loop While
Imports System

Public Class MainClass

    Shared Sub Main(ByVal args As String())
       Dim counterVariable As Integer = 100

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


End Class

           
       








Related examples in the same category

1.If inside Do While loopIf inside Do While loop
2.Do While LoopDo While Loop
3.Do Loop while Do Loop while
4.Exit a Do While LoopExit a Do While Loop