private static void ProcessSort(List <int> list, Sorter sorter) { Console.WriteLine("Sorting..."); StopWatch watch = StopWatch.StartNew(); list = sorter.Sort(list); double ms = watch.ElapsedMilliseconds(); for (int i = 0; i < 10; i++) { Console.WriteLine("{0, 5}", list[i]); } Console.WriteLine("{0, -10} {1, 10:N} seconds", sorter.GetType().Name, ms / 1000.0); }