示例#1
0
 public void Add(IQuackable quacker)
 {
     Console.WriteLine("Quacker {0} Added to Flock.", quacker.GetType().Name);
     ducks.Add(quacker);
 }
 public void Update(IQuackable duck)
 {
     Console.WriteLine($"Quackologist Got: {duck.GetType().Name}");
 }
 public override string ToString()
 {
     return(_duck.GetType().Name);
 }