static void Main(string[] args) { ScaryScary fingersTheClown = new ScaryScary("big shoes", 14); FunnyFunny someFunnyClown = fingersTheClown; IScaryClown someOtherScaryclown = someFunnyClown as ScaryScary; someOtherScaryclown.Honk(); Console.ReadKey(); }
static void Main(string[] args) { ScaryScary fingersTheClown = new ScaryScary("big shoes", 14); FunnyFunny someFunnyClown = fingersTheClown; IScaryClown someOtherScaryClown = someFunnyClown as ScaryScary; someOtherScaryClown.Honk(); Console.ReadKey(); }
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(); }