private void button3_Click(object sender, EventArgs e) { ScaryScary fingersTheClown = new ScaryScary("big shoes", 14, "spider"); FunnyFunny someFunnyClown = fingersTheClown; IScaryClown someOtherScaryClown = someFunnyClown as ScaryScary; someOtherScaryClown.Honk(); someOtherScaryClown.ScareLittleChildren(); }
private void button3_Click(object sender, EventArgs e) { ScaryScary fingersTheClown = new ScaryScary("big shoes", 14, "spider"); FunnyFunny someFunnyClown = fingersTheClown; IScaryClown someOtherScaryClown = someFunnyClown as ScaryScary; someOtherScaryClown.Honk(); someOtherScaryClown.ScareLittleChildren(); }