© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
R. VystavělC# Programming for Absolute Beginnershttps://doi.org/10.1007/978-1-4842-7147-6_19

19. Advanced Conditions

Radek Vystavěl1  
(1)
Ondřejov, Czech Republic
 

The third part of this book concludes with several tasks concerning conditional execution that may be considered advanced. First, you will study the conditional operator, then you will write a program containing several complex conditions, and finally you will learn about an important maxim: when you want to test something, you must be sure it exists.

Conditional Operator

In many cases, the if-else construction can be replaced with the conditional operator, which results in one of the two values depending ...

Get C# Programming for Absolute Beginners: Learn to Think Like a Programmer and Start Writing Code now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.