Пример #1
0
        static void Main(string[] args)
        {
            Cat       cat = new Cat("Маркиз");
            MaineCoon mc  = new MaineCoon("Чейз");

            CovarianceGenericDel <MaineCoon> delMaineCoon = mc.GetMaineCoon;
            CovarianceGenericDel <Cat>       delCat       = delMaineCoon;

            Cat newCat = delCat();

            newCat.ShowInfo();

            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            Cat       cat = new Cat("Маркиз");
            MaineCoon mc  = new MaineCoon("Чейз");

            CovarianceGenericDel <MaineCoon> delMaineCoon = ShowMaineCoonInfo;

            delMaineCoon(mc);

            Console.WriteLine(new string('-', 15));

            CovarianceGenericDel <Cat> delCat = ShowCatInfo;

            delMaineCoon = delCat;
            delMaineCoon(mc);

            Console.ReadKey();
        }