コード例 #1
0
ファイル: Program.cs プロジェクト: Kim368/C-
        static void Main(string[] args)
        {
            Master_Athletics athlet = new Master_Athletics()
            {
                name = "Петя", last_name = "Атлетов", mother_name = "Никитич"
            };

            Master_Basketball basket = new Master_Basketball(Leagues.NBA)
            {
                name = "Федя", last_name = "Корзиночкин", mother_name = "Ильич"
            };

            Master_Boxin boxin = new Master_Boxin()
            {
                name = "Добрыня", last_name = "Ударов", mother_name = "Кузьмич"
            };

            boxin.PrintMethod(DelPrint);
            boxin.InInf += athlet.Print;
            boxin.InInf += basket.Print;
            boxin.Print();
            Sportsman[] SportArray = new Sportsman[] { athlet, basket, boxin };
            Console.WriteLine();
            Console.WriteLine(SportArray[0]);
            Console.WriteLine(SportArray[1]);
            Console.WriteLine(SportArray[2]);
            Array.Sort(SportArray);
            Console.WriteLine();
            Console.WriteLine(SportArray[0]);
            Console.WriteLine(SportArray[1]);
            Console.WriteLine(SportArray[2]);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Kim368/C-
        static void Main(string[] args)
        {
            Master_Athletics athlet = new Master_Athletics();

            Master_Basketball basket = new Master_Basketball(Leagues.NBA);

            Master_Boxin boxin = new Master_Boxin();

            athlet.Print();
            basket.Print();
            boxin.Print();
        }