Example #1
0
        static void Main(string[] args)
        {
            DelegateSortApp app = new DelegateSortApp();

            // Print array in original order.
            foreach(int i in sortTable)
                Console.WriteLine(i);

            Console.WriteLine("Sorting");
            BubbleSort sorter = new BubbleSort();
            BubbleSort.Order order = new BubbleSort.Order(SortOrder);
            sorter.Sort(sortTable, order);

            foreach(int i in sortTable)
                Console.WriteLine(i);
            Console.WriteLine("Done");
        }
Example #2
0
        static void Main(string[] args)
        {
            DelegateSortApp app = new DelegateSortApp();

            // Print array in original order.
            foreach (int i in sortTable)
            {
                Console.WriteLine(i);
            }

            Console.WriteLine("Sorting");
            BubbleSort sorter = new BubbleSort();

            BubbleSort.Order order = new BubbleSort.Order(SortOrder);
            sorter.Sort(sortTable, order);

            foreach (int i in sortTable)
            {
                Console.WriteLine(i);
            }
            Console.WriteLine("Done");
        }