C# foreach loop

C# foreach tutorial image

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.

C# if Statement

C# If..else statement - logo + graphic illustration

The if is the decision making statement in C sharp that enables executing a block of code if a certain condition is true.