コード例 #1
0
        static void Main(string[] args)
        {
            MyEvent <int> Event = new MyEvent <int>();
            ///////////////////////1///////////////////////////////////////
            MyArrayList list = new MyArrayList();
            Random      rand = new Random();

            list.Add = rand.Next();
            list.Add = 2;
            list.Add = rand.Next();
            list.Add = rand.Next();
            list.Add = rand.Next();
            list.Add = rand.Next();
            list.Add = "string";
            list.Add = 2;
            list.Add = "string";

            Event.EventHandler3 += list.Delete;
            Event.EventHandler4 += list.Show;
            Event.DeleteArr("string");
            Event.DeleteArr(2);
            Console.WriteLine("----------------------------------------------------");

            ////////////////////////2/////////////////////////////////////
            MySortedSet <int> Col1 = new MySortedSet <int>();

            Col1.Add = rand.Next();
            Col1.Add = rand.Next();
            Col1.Add = rand.Next();
            Col1.Add = rand.Next();
            Col1.Add = rand.Next();
            Col1.Add = rand.Next();
            Col1.Add = 32;
            Col1.Add = 49;
            Col1.Add = 111;

            Event.EventHandler  += Col1.Delete;
            Event.EventHandler2 += Col1.Show;

            Event.Delete(32);

            Console.WriteLine("----------------------------------------------------");
            ///////////////////////////////////////////////////////2.2///////////////////////

            MyDictionary <int, int> dictionaty = new MyDictionary <int, int>();

            Event.EventHandler5 += dictionaty.Show;
            Event.Transform(Col1, dictionaty);
            dictionaty.Search(1);
            Console.WriteLine("----------------------------------------------------");

            /////////////////////////////////////////////////3////////////////////////////////
            Employee         Employee1   = new Employee("Maxim1", "Svirid", 26, "Hight", "AutoCardan", 700);
            Turner           Turner2     = new Turner("Maxim2", "Svirid", 25, "machine operator of wide profile", "AutoCardan", 34000);
            Programmer       Programmer1 = new Programmer("Maxim3", "Svirid", 28, "JS, AspectJ, PL/M, REXX", "EPAM", 44000);
            MyEvent <Person> EventPerson = new MyEvent <Person>();

            MyClassSortedSet <Person> n = new MyClassSortedSet <Person>();

            EventPerson.EventHandler  += n.Add;
            EventPerson.EventHandler2 += n.Show;

            EventPerson.ADD(Employee1);
            EventPerson.ADD(Programmer1);
            EventPerson.ADD(Turner2);
            EventPerson.Show();



            Console.ReadKey();
        }