Boolean Logic
The bool type introduced in the previous tutorials can hold one of only two values: […]
The bool type introduced in the previous tutorials can hold one of only two values: […]
C# enables you to label lines of code and then jump straight to them using […]
The simplest way to perform a comparison is to use the ternary (or conditional ) […]
The if statement is a far more versatile and useful way to make decisions. Unlike […]
In the preceding example, you checked for three conditions involving the value of var1 . […]
The switch statement is similar to the if statement in that it executes code conditionally […]
do loops operate as follows. The code you have marked out for looping is executed, […]
while loops are very similar to do loops, but they have one important difference: The […]
The last type of loop to look at in this tutorial is the for loop. […]
break Causes the loop to end immediately . Example
Continue only break the flow of the loop, not the whole loop. whenever continue encounters, […]
infinite loops are the loops which are executed endlessly. They are often useful sometimes where […]
The meaning of the variable is determined by the way in which this data is […]