Ejemplo n.º 1
0
        private static void TreadTwoRun()
        {
            var srtThr = new SortingThreat();

            srtThr.Done += ShowMessage;
            var myThread = new Thread(srtThr.SortStart);

            myThread.Start();
        }
Ejemplo n.º 2
0
        private static int[] CustomSortDemo()
        {
            int[]      arr       = { 6, 5, 47, 8, 2, 4, 6, 2, 58, 5 };
            string[]   s         = { "asd", "hsdfgf", "asg", "ueot", "hello", "asd" };
            Sort <int> intSort   = CustomSort.CustomEqual;
            var        sortedInt = CustomSort.Sort(arr, intSort);

            Console.WriteLine("Int sorting in thread 1:" + Environment.NewLine);
            SortingThreat.Print(sortedInt);
            Sort <string> strSort   = CustomSort.CustomEqual;
            var           sortedStr = CustomSort.Sort(s, strSort);

            Console.WriteLine("String sorting in thread 1:" + Environment.NewLine);
            SortingThreat.Print(sortedStr);
            return(arr);
        }