syntax foreach loop C# code example Example: syntax foreach loop C# foreach (type variableName in arrayName) { // code block to be executed }