In this chapter you will learn:
- What is Loop Constructs in C#?
- How many types of looping statements in C sharp?
- How to use loop constructs in Programming?
The loop constructs are used to execute a block of code until the condition becomes expired. Loop constructs in C# save the programmer from writing code multiple times that has repetitive in nature. If you have to print your name ten times then there is no need to write code for printing ten times. Just write it once and executes within loop constructs ten times.
C# provides various loop constructs as for loop, do while loop, while loop and foreach loop. However, you can use goto statements also for creating loop.
List of Contents
C# Loop Constructs
- Chapter 1: while loop
- Chapter 2: do-while loop
- Chapter 3: for-loop
- Chapter 4: foreach
- Chapter 5: Examples
- Chapter 6: Exercises
Summary
This session explains about all the looping constructs in C# as while loop, do while loop, for loop, foreach loop etc. In next chapter you will learn about while loop in details.