Chapter 3
Controlling the Flow, Converting Types, and Handling Exceptions
Section 2
Understanding Selection Statements
This video explains how every application needs to be able to select from choices and branch along different code paths. The two selection statements that are available in C# are if and switch. You can use if for all your code but switch can simplify your code in some common scenarios. To understand selection statements effectively, you need to: - Implement a simple if statement - Implement the new pattern matching feature of C# using the if statement - Implement a simple switch statement - Implement pattern matching using a switch statement