3 C# Operators & Conditionals
This chapter covers
- Using operators and expressions in C#
- Correctly controlling Operator associativity and precedence
- Working with Conditional Selection statements in C#
- Developing a Rock-Paper-Scissor minigame
In the previous chapters, we already set up two projects. We learned about variables, data types, and the random class. We also learned about concatenation and how we can get custom results using more exciting features like conditional statements and loops. These previous chapters were somewhat limited for theory and had to up the complexity by adding yet potentially unfamiliar statements. However, this chapter will achieve the necessary theoretical complexity to develop a proper project. This is mainly because we will finally deep dive into conditional statements in C#, covering statements such as the switch statement and the ternary operator. Also, everything commonly missed about operators, operator evaluation, operator precedence, and, additionally, learning about nullable and what constant variables have that switch statements want, among others.