using System; using System.Collections; public class Example { public static void Main() { ArrayList a = new ArrayList(); a.Add("один"); a.Add("два"); a.Add(3); Console.WriteLine( "Кількість елементів: {0}", a.Count ); Console.WriteLine( "Ємність: {0}", a.Capacity ); Console.Write("Значення:" ); PrintA(a); } public static void PrintA (IEnumerable ie) { foreach (Object o in ie) Console.Write(" {0}", o); Console.WriteLine(); } }