using System;
using System.Collections;
class MainClass {
publicstaticvoid Main() {
ArrayList al = new ArrayList();
Console.WriteLine("Adding 6 elements");
al.Add('C');
al.Add('A');
al.Add('E');
al.Add('B');
al.Add('D');
al.Add('F');
Console.WriteLine("Add enough elements to force ArrayList to grow. Adding 20 more elements");
for(int i=0; i < 20; i++)
al.Add((char)('a' + i));
Console.WriteLine("Current capacity: " +
al.Capacity);
Console.WriteLine("Number of elements after adding 20: " +
al.Count);
Console.Write("Contents: ");
foreach(char c in al)
Console.Write(c + " ");
Console.WriteLine("\n");
}
}