Conditional Statement in C#
Condition Statement: A statement that can be executed based on a condition is known as a “Conditional Statement”. The statement is often a block of code. The following are the 2 types: Conditional Branching. Conditional Looping. Conditional Branching: This statement allows you to branch your code depending on whether or not a certain condition is met. In C# are the following conditional branching statements: 1. if statement. 2. if-else statement. 3. if-else-if ladder statement. 4. Nested if statement. 5. switch case statement. Here if, else and switch are pre-defined keywords. 1. if Statement: If statement checks the given Boolean condition. If the Boolean condition evaluates to be true then the block of code/statements will...