What is foreach loop in C#?

c# foreach-list

The C# foreach statement is used to iterate through the elements of collections, arrays etc. You may execute single statement or a block of statements for each element as using the foreach statement.