Esempio n. 1
0
        static void Main(string[] args)
        {
            ScaryScary  fingersTheClown     = new ScaryScary("big shoes", 14);
            FunnyFunny  someFunnyClown      = fingersTheClown;
            IScaryClown someOtherScaryClown = someFunnyClown as ScaryScary;

            someOtherScaryClown.Honk();
            Console.ReadKey();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            ScaryScary  fingersTheClown     = new ScaryScary("big shoes", 14);
            FunnyFunny  someFunnyClown      = fingersTheClown;
            IScaryClown someOtherScaryClown = someFunnyClown as ScaryScary;

            someOtherScaryClown.Honk();
            Console.WriteLine(someOtherScaryClown.ScaryThingIHave);
            someOtherScaryClown.ScareLittleChildren();
            Console.ReadKey();
        }