Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            ScaryScary  fingersTheClown     = new ScaryScary("big shoes", 14);
            FunnyFunny  someFunnyClown      = fingersTheClown;
            IScaryClown someOtherScaryclown = someFunnyClown as ScaryScary;

            someOtherScaryclown.Honk();
        }
Exemplo 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.ReadKey();
        }