In this chapter you will learn:
- How many types of conditional constructs in C#?
- What is if else constructs and how to use it in a program?
- What is switch case constructs and how to use it in a program?
Conditional constructs are used to transfer execution control to the correct path based on comparison result. The conditional constructs determine runtime that which statements need to be executed. It uses comparison result for determining correct path of execution.
If else, switch case are used for comparing value. In this chapter you will learn about conditional constructs in C#.
Conditional ConstructsList of Contents
- Chapter 1: if-else constructs
- Chapter 2: switch-case constructs
- Chapter 3: Examples
- Chapter 4: Exercises
After completing this chapter you will be able to describe various conditional constructs in C# as if else constructs, switch case constructs etc. In next chapter you will learn in detail about C# if else constructs.