Conditional Statements is a block that execute based on a condition and they are divided into two categories
- Conditional Branching;
- Conditional Loop;
1. Conditional Branching :- These statements allows us to branch the code depending on which certain condition were meet or not . C# has 2 constructors for branching code ; the; if statement which allows us to test whether a specific condition is meet, and the switch statement which allows us to compare an expression with a number of different values.
Syntax declaration for if statement;
No comments:
Post a Comment