May 2010
Intermediate to advanced
1272 pages
61h 18m
English
As in the previous versions of the language, Visual Basic 2010 offers two kinds of loops: Do..Loop and While..End While. In this section we take a look at both loops.
Do..LoopThe Do..Loop is the most used loop in Visual Basic and the most flexible. Basically such a loop can have two behaviors: repeating a set of actions until a condition is false and repeating a set of actions until a condition is true. The first scenario is accomplished using a Do While statement, as demonstrated in Listing 4.3.
Listing 4.3 Performing a Do While Loop

The code is quite easy: Whereas the value of max is less than the maximum value of the Integer type, increment ...
Read now
Unlock full access