C# Conditions – if, else if, switch statements

C# .Net Conditions (conditional statements)

Conditions are generally used to determine if a certain piece of code is to be run(executed) depending on certain conditions. Conditional statements are tested by checking if the condition amounts to either True or False (boolean). 

Conditional statements occur within if and else if statements, the switch statement also uses conditions but not quite in the same way as if statements. Loops are another example of the use of conditional statements.