As you have already seen in previous chapter projects, there are times when you need to create loops within your applications in order to repeatedly perform a number of steps. Loops are also essential for processing large amounts of data without requiring a large number of programming statements. Loops are a great option for processing the contents of arrays and controls, such as the ComboBox and ListBox, which store collections of data. In this chapter, you will learn how to use a number of Visual Basic statements to create different kinds of loops. In addition, you will get the chance to apply what you'll learn through the development of the chapter's game project, the Dice Poker game.
Specifically, you will learn how to:
Create Do…While and Do…Until loops
Create For…Next and For Each…Next loops
Create While loops
Use variations of the Exit keyword to break out of loops
Guard against endless loops