using System;
public class Program
{
public static void Main()
var numbers = new int[] {1, 2, 3, 4, 5, 6};
foreach (var number in numbers)
// Skip if 2
if (number == 2)
continue;
// Stop iteration if 5
if (number == 5)
break;
Console.Write(number + ", ");
}