Selection Statements

No meaningful program can operate without conditional execution. Depending on runtime state, different groups of statements are executed. C# has two constructs that enable this style: the if statement and the switch statement.

Get C# 4.0 Unleashed 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.