1. Home
  2. Computing & Technology
  3. Visual Basic

Chapter 7 - Using Loops and Timers - Part 1

By Dan Mabbutt, About.com

4 of 8

Beyond the Book: Two New Loop Statements While ... While End and For Each loops

The book discusses the first two types of loops in some detail but only mentions While...End While briefly. The illustration at the beginning of the lesson shows you the syntax of the While...End While loop. The structure is similar to the Do Loop so there isn't really a absolute need to have it in the language. In fact, it's exactly the same as ...

~~~~~~~~~~~~~~~~~~~~~~~~~
Do While [condition]
  [statements]
Loop
~~~~~~~~~~~~~~~~~~~~~~~~~

Many programmers prefer the While ... End While loop because it's so clear and uncomplicated. Even if you don't use it yourself, you will see it in code written by others, so it's something you also need to know about.

Explore Visual Basic
By Category
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Using Loops and Timers - Part 1

©2009 About.com, a part of The New York Times Company.

All rights reserved.