© 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.