Conditional Operators
To control the C# program flow, we can use various conditional operators. Basically, they resemble mathematical operators. Conditional operators let the C# program compare data values and then decide what action to take, whether to execute a program or terminate the program, etc. These operators are shown on the right: |
|
Logical Operators
In addition to conditional operators, there are a few logical operators which offer added power to the C# programs. These operators are shown on the right: |
|
if ... else if ... else
Statements with Operators
To effectively control the C# program flow, we shall use |
|
else if
or else
.