예제 #1
0
        static void Main(string[] args)
        {
            Random random = new Random();

            SortArray <int> sortArrayInt = new SortArray <int>(10);

            sortArrayInt.array = new int[] { 5, 2, 7, 10, 45, 89, 23, 67, 56, 89 };

            //sortArrayInt.EndSort += delegate (object sender, Message e)
            //{
            //    Console.WriteLine("Метод {0} сообщил, {1}", sender, e.msg);
            //};

            //sortArrayInt.EndSort += (object sender, Message e)=>
            //{
            //    Console.WriteLine("Метод {0} сообщил, {1}", sender, e.msg);
            //};

            sortArrayInt.EndSort += ((sender, e) => Console.WriteLine("Метод {0} сообщил, {1}", sender, e.msg));

            sortArrayInt.ShowArray();

            sortArrayInt.Sort(sortArrayInt.Ascending);

            sortArrayInt.SortThread(sortArrayInt.Descending, 5);
        }