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); }
static void Main(string[] args) { CountArrays CArrays = new CountArrays(); CArrays.CountArraysTogether(); SumofArrays SArrays = new SumofArrays(); SArrays.SumofAllArraysTogether(); MeanofArrays MArrays = new MeanofArrays(); MArrays.MeanofAllArraysTogether(); ReverseArrays RArrays = new ReverseArrays(); Console.WriteLine("\n----Reverse of Arrays----"); Console.WriteLine("ArrayA"); RArrays.ReverseArray(ArrayA); Console.WriteLine("ArrayB"); RArrays.ReverseArray(ArrayB); Console.WriteLine("ArrayC"); RArrays.ReverseArray(ArrayC); RotateArrays ROArrays = new RotateArrays(); Console.WriteLine("----Rotate Array----"); Console.WriteLine("ArrayA"); ROArrays.RotateArray("Left", 2, ArrayA); Console.WriteLine("ArrayB"); ROArrays.RotateArray("Right", 2, ArrayB); Console.WriteLine("ArrayC"); ROArrays.RotateArray("Left", 4, ArrayC); SortArray SArray = new SortArray(); SArray.Sort(ArrayC); Console.ReadLine(); }