This chapter focuses on how we can manage program flow in C#. In other words, this chapter will help you understand how the program controls and validates input and output arguments and makes decisions using statements that are available in C#. We will cover various Boolean expressions, such as If/Else and Switch, which control the flow of code based on certain conditions. We will also evaluate various operators, such as the conditional operator and the equality operator (<, >, ==), both of which govern the flow of code. We will focus on how we can iterate across collections (with for loops, while loops, and so on) and explicit jump statements.
The following topics will be covered in this chapter.
- Understanding operators
- Understanding conditional/selection statements
- Iteration statements