© Radek Vystavěl 2017

Radek Vystavěl, C# Programming for Absolute Beginners, https://doi.org/10.1007/978-1-4842-3318-4_19

19. Advanced Conditions

Radek Vystavěl

(1)Ondřjov, 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 on whether a condition is or is not fulfilled. If you ...

Get C# Programming for Absolute Beginners 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.