using System;
using System.Collections; // We need to implement collection class
class ArrayList
{
public static void Main(string []args)
{
ArrayList n = new ArrayList ();
// Read all the array items from the console
n.Add(args[0]);
n.Add(args[1]);
n.Add(args[2]);
n.Add(args[3]);
n.Add(args[4]);
Console.WriteLine ("The items in the Array List before sorting are : ");
for (int i =0; i< n.Count; i++)
{
Console.Write (i + " : " +n[i]); // Print each array element
}
n.Sort(); // Sort the array list
Console.WriteLine ("The items in the Array List after sorting are : ");
for (int i =0; i< n.Count; i++)
{
Console.Write (i + " : " +n[i]); // Print each array element
}
Console.ReadLine();
}
}