public void quack()
        {
            IEnumerator iterator = quackers.GetEnumerator();

            while (iterator.MoveNext())
            {
                Quackable quacker = (Quackable)iterator.Current;
                quacker.quack();
            }
        }
        public void quack()
        {
            var enumerator = quackers.GetEnumerator();

            while (enumerator.MoveNext())
            {
                Quackable quacker = enumerator.Current;
                quacker.quack();
            }
        }
Exemple #3
0
    public void quack()
    {
        IEnumerator <Quackable> enumerable = quackers.GetEnumerator();

        while (enumerable.MoveNext())
        {
            Quackable quacker = enumerable.Current;
            quacker.quack();
        }
    }
Exemple #4
0
 public void quack()
 {
     duck.quack();
     numberOfQuacks++;
 }
 private void simulate(Quackable duck)
 {
     duck.quack();
 }
Exemple #6
0
 public void quack()
 {
     m_duck.quack();
     m_numberOfQuacks++;
 }
Exemple #7
0
 private void simulate(Quackable q)
 {
     q.quack();
 }
Exemple #8
0
 public void quack()
 {
     duck.quack();
     numberofQuack++;
 }