C# foreach loop
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.
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.
The if is the decision making statement in C sharp that enables executing a block of code if a certain condition is true.