HOW TO CREATE DO LOOP IN VB.NET

Ankit Singh

Total Post:341

Points:2389
Posted by  Ankit Singh
VB.Net 
 568  View(s)
Ratings:
Rate this:
I want to use   Do loop in vb.net  how to do this.
  1. aditya kumar Patel

    Post:254

    Points:1810
    Re: How to create Do loop in vb.net

    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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!