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

Chapter 7 - Using Loops and Timers - Part 1

By Dan Mabbutt, About.com

2 of 8

Let's Get Looping!

For Syntax

One way to understand looping is to "divide and conquer" by classifying all loops by what they can do. All loops have these things in common.

  • A statement that tells VB.NET that a looping structure is starting.
  • Statements that can be executed zero or more times inside the loop.
  • A condition somewhere that tells VB.NET whether to execute the statements again.
  • A statement that tells VB.NET where the end of the looping structure is.

The statements that tell VB.NET that a looping structure is starting are:

  • For
  • Do
  • While

Here's a diagram showing exactly what the various parts of a For statement are:

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.