public static void Main() { Container employees = new Container(); //create and add employees here Container.CompareItemsCallback sortByName = new Container.CompareItemsCallback(Employee.CompareName); employess.Sort(sortByName); }
public static void Main() { Container employees = new Container(); // create and add some employees here // create delegate to sort on names, and do the sort Container.CompareItemsCallback sortByName = new Container.CompareItemsCallback(Employee.CompareName); employees.Sort(sortByName); // employees is now sorted by name }