In the Shakespeare.cs program presented in Chapter 2, “Your First C# Program,” all statements were executed sequentially in the order they were written in the source code. This is called sequential execution. Normally, statements in a method are executed sequentially; that is, if none of the constructs, presented in this and the next chapter that are specifically designed to redirect this otherwise linear flow of events, are encountered.
A program based purely on sequential execution will, during each execution, always perform exactly the same actions; it is unable to react in response to current conditions.
But life is seldom that simple. Often, programs need to alter the flow of control in a program.
The flow ...