예제 #1
0
 void MakeFlight(IFlyable dingetje)
 {
     dingetje.LiftOff();
     dingetje.Fly();
     dingetje.Fly();
     dingetje.Fly();
     dingetje.Land();
     Console.WriteLine();
 }
예제 #2
0
 private static void Fly(IFlyable flyable)
 {
     flyable.TakeOff();
     Console.WriteLine($"Flying at the {flyable.MaxHeight} height");
     flyable.Land();
 }