using System; using System.Collections.Generic; namespace test { public class test { public static void Main() { List x = new List(); x.Add(1); x.Add(4); x.Add(9); foreach(int i in x){ x[2] = 3; } foreach(int i in x){ System.Console.WriteLine(i); } } } }