© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
G. ByrneTarget C#https://doi.org/10.1007/978-1-4842-8619-7_10

10. Iteration

Gerard Byrne1  
(1)
Belfast, Ireland
 

Iteration and Loops

We learned in Chapter 9 that selection is a particularly important programming concept in all programming languages. To use selection in our C# code, we have several construct options , and the best construct option to choose will depend on the particular task the code has to perform. The different construct options for selection are the if construct, the if-else construct, the if else if construct, and the switch construct with its case label. The switch construct can use numeric or string data types, and when we use strings, ...

Get Target C#: Simple Hands-On Programming with Visual Studio 2022 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.