© 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_16

16. Practical Conditions

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

In the previous chapter, you learned about the conditional execution of a program’s statements. In this chapter, you will deepen your knowledge of this topic. I will show you how to use conditions and branching on several simple tasks that you will encounter sooner or later in your programming career.

Appending Extension

Sometimes, you want to ask the user about a file name, but you do not know whether the user will enter it with or without an extension.

Task

You will write a program that appends the ...

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.