Collections C# Book

The following code calls Sort method directly on the ArrayList instance.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
class MainClass
{
public static void Main()
{
// Create a new ArrayList and populate it.
ArrayList arraylist = new ArrayList(4);
arraylist.Add("M");
arraylist.Add("K");
arraylist.Add("A");
arraylist.Add("A");
// Sort the ArrayList.
arraylist.Sort();
// Display the contents of the sorted ArrayList.
Console.WriteLine("\nArraylist sorted by content");
foreach (string s in arraylist)
{
Console.WriteLine(s);
}
}
}