Loops
C# Loops
A loop statement allows us to execute a statement or a group of statements multiple times and following is the general from of a loop statement in most of the programming languages β

Example
In the following example, we define an array and use the loop to display the elements of the array β
using System;
class Example {
Β static void Main(string[] args) {
Β Β int[] number = { 1, 2, 3, 5, 6 }; Β Β
Β Β for (int i = 0; i < number.Length; i++) {
Β Β Console.WriteLine(number[i]); Β Β
Β } Β Β
}
}