It should be a frequent scenario to sort the order of objects in a collection, such as ArrayList. ArrayList in c# provide a method named Sort(). But we need to let ArrayList know the detailed sorting algorithm. There are two means to implement this: 1.