//输出自身所有属性 public void ShowSelf() { Display(); Swim(); quackType.Quack(); flyType.Fly(); }
static void Iwanttofly(IFly fly) { fly.Fly(); }
public void MakeFly() { _fly.Fly(); }
public void PerformFly() { flyBehavior.Fly(); }
public void Fly() { ifly.Fly(); }
public void Fly() { _fly.Fly(); }
public virtual void fDuckMet() { _fly.Fly(); }
public void Fly() { FlyAbility.Fly(); }
public override void Fly() { ifly.Fly(); //Console.WriteLine("Fly"); }
public string TryToFly() { return(flyingType.Fly()); }
public override string ToString() { return($"name : {name} height : {height} when fly : {myFliyingAbility.Fly()}"); }
public virtual void MakeFly() { _fly.Fly(); }
public void Fly() { Console.WriteLine("Do you Fly?"); _flyBehaviour.Fly(); Console.WriteLine(); }
public void PerformFly() { Fly.Fly(); }
/// <summary> /// 可以飛的英雄執行飛行,因為不是每個繼承 IAvengers 的英雄類別都有再繼承 IFly 介面 /// 因次要限定傳入的英雄參數有繼承 IFly 才能執行飛行方法 /// </summary> public void FlyAway(IFly canFlyHero) { canFlyHero.Fly(); }
public void Fly() { FlytType?.Fly(); }
public void DoFly() { flyAction.Fly(); }
public virtual void Fly() { _fly?.Fly(); }
static void FlyPlease(IFly flying) { flying.Fly(); }
public virtual void FPropFunc() { _fly.Fly(); }
public void Test() { Console.WriteLine($"test in {nameof(HasDependencyTest)}"); _fly.Fly(); }
private static void ICanFly(IFly flyingDuck) { flyingDuck.Fly(); }