O'Reilly logo

Special Edition Using C# by NIIT

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Statements

Statements represent instructions. They specify the action to be performed. C# supports most of the statements found in C and C++. However, some of these statements have been modified to suit the C# specifications.

Statements can be classified as

Selection Statements

The Microsoft C# Language Reference states that a selection statement “selects one of a number of possible statements for execution based on the value of a controlling expression.” The following sections take a close look at each kind of selection statement.

The if Statement

The if statement is one of the fundamental selection statements and one of the most commonly used. In an if ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required