Sort a list of DateTime objects

This sample program shows how, in C#, to sort a list of DateTime objects either in ascending or descending order.