Home > DeveloperSection > Forums > How to create Do loop in vb.net
Ankit Singh

Total Post:341

Points:2389
Posted on    December-22-2015 10:20 PM

 VB.Net VB.Net 
Ratings:


 1 Reply(s)
 281  View(s)
Rate this:
I want to use   Do loop in vb.net  how to do this.


aditya kumar Patel

Total Post:250

Points:1782
Posted on    December-22-2015 10:21 PM

It repeats the enclosed block of statements while a Boolean condition is True or until the condition becomes True. It could be terminated at any time with the Exit Do statement.

Module Module1
    Sub Main()
        Dim a As Integer = 20
        Do
            Console.WriteLine("value of a: {0}", a)
            a = a + 2
        Loop While (a < 50)
        Console.ReadLine()
    End Sub
End Module


Don't want to miss updates? Please click the below button!

Follow MindStick