O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.10. Wrap-Up

Chapter 5 discussed the if, if ... else and while control statements. In this chapter, we discussed the for, do ... while and switch control statements. (We’ll discuss the foreach statement in Chapter 8.) You learned that any algorithm can be developed using combinations of sequence (i.e., statements listed in the order in which they should execute), the three selection statements—if, if ... else and switch—and the four repetition statements—while, do ... while, for and foreach. You saw that the for and do ... while statements are simply more convenient ways to express certain types of repetition. Similarly, we showed that the switch statement is a convenient notation for multiple selection, rather than using nested if ... else ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required