public static void bottomThree(Organization org) { List <Employee> lastThree = new List <Employee>(); for (int i = (org.numOfEmpl - 1); i >= org.numOfEmpl - 3 && i >= 0; i--) { lastThree.Add(org.list[i]); } FeeComparer comparer = new FeeComparer(); lastThree.Sort(comparer); Console.Write("\n"); for (int i = 0; i < 3; i++) { employeeInfoOut(lastThree[i]); } Console.Write("\n"); }
public void sort() { FeeComparer c = new FeeComparer(); list.Sort(c); }