| You are here: | About>Computing & Technology>Visual Basic> Learn VB.NET> Using Loops and Timers - Loop Conditions |
![]() | Visual Basic |
Using Loops and Timers - Loop ConditionsStarting and Stopping the LoopThis article is extracted from page 2 of the lesson for chapter 7 of the About Visual Basic "Complete Course" for VB.NET. Sign up for the entire course at ... this signup page. When coding a loop, the condition that controls whether the statements inside the loop are executed again can be:
Virtually any program statements can be inside the loop (including more looping statements). The next chapter (which covers program debugging) in the Complete VB.NET Course (see above) shows you a debugging statement that the book doesn't cover, Debug.WriteLine, that will help you understand what the loop does. The While and Until conditions that control whether the statements inside the loop are executed again can be found either at the beginning of the loop or at the end. The code you would use is shown below. The While and Until conditions that controls whether the statements inside the loop are executed again can be found either at the beginning of the loop or at the end. In other words, you can code: Do While condition... Loop or Do ... Loop While condition But you can't have the condition at both the beginning and at the end. |
Las Vegas on a BudgetFind a BargainHotel DealsCheap EatsFree AttractionsEntertainment for Less |
All Topics | Email Article | | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


