How to create Do loop in vb.net

Total Post:341

Points:2389
VB.Net 
 854  View(s)
Ratings:
Rate this:
I want to use   Do loop in vb.net  how to do this.
  1. Post:281

    Points:2003
    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

      Modified On Apr-10-2018 06:45:55 AM

Answer