private static void Main(string[] args) { var duck = new Duck(); DoRun(duck); DoSwim(duck); DoFly(duck); var runnerDuck = new RunnerDuck(); DoRun(runnerDuck); DoSwim(runnerDuck); //DoFly(runnerDuck); <-- not possible: Build will fail! Console.ReadLine(); }
private static void Main(string[] args) { var duck = new Duck(); DoRun(duck); DoSwim(duck); DoFly(duck); var runnerDuck = new RunnerDuck(); DoRun(runnerDuck); DoSwim(runnerDuck); //DoFly(runnerDuck); Console.ReadLine(); }