using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
List
list.Add(2);
list.Add(3);
list.Add(7);
foreach (int prime in list) // Loop through List with foreach
{
Console.WriteLine(prime);
}
for (int i = 0; i < list.Count; i++) // Loop through List with for { Console.WriteLine(list[i]); } } }