17-Do Until Loop

2
333

This Visual Basic tutorial is all about Do Until Loop.

In Visual Basic, all loops have a similar purpose that make block of statements to repeat a number of times.

The Do Until and the Do While loop is a bit similar to each other. The only difference of the Do Until loop is, it uses a  slightly different syntax.

 

Take note that if you are not careful with the syntax of Do Until it will result in an infinite Loop

 

 

This is the example in doing Do Until Loop.

  1. Dim i As Integer = 0
  2. Do Until i = 10
  3.  
  4. i += 1
  5.  
  6. MsgBox(i)
  7. Loop

Readers might read also:

 

 

Facebook Comments
(Visited 20 times, 1 visits today)

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here