[Previous] [Contents] [Next]

Selection Statements

You use selection statements to determine what code should be executed and when it should be executed. C# features two selection statements: the switch statement, used to run code based on a value, and the if statement which runs code based on a Boolean condition. The most commonly used of these selection statements is the if statement.

[Previous] [Contents] [Next]