예제 #1
0
 public virtual void Eat()
 {
     _duck.Eat();
 }
예제 #2
0
 private static void DoDuckThings(IDuck duck)
 {
     Console.WriteLine($"{duck.GetType().Name}: {duck.Quack()}");
     duck.Eat();
 }