Hour 8. Controlling Program Flow

What You’ll Learn in This Hour

Understanding the selection statements

Iteration statements

Jump statements

At its heart, C# is a procedural programming language, so statements are executed sequentially in the order they appear in the source code. This execution order is referred to as program flow. As you might imagine, following only a strict execution order would provide little flexibility. What is missing is a way to control or change what statements are executed based on the result of testing conditions. C# provides control flow statements that change the order of execution.

All the control flow statements have the same basic characteristics; they select any number of statements to be executed based ...

Get Sams Teach Yourself C# 5.0 in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.