public override void print() { SetorIterator setoriterator = iterator(); while (setoriterator.MoveNext()) { Corporate c = (Corporate)setoriterator.Next(); c.print(); } }
public void print() { using (IEnumerator <Corporate> enumerator = corporate.GetEnumerator()) { while (enumerator.MoveNext()) { Corporate c = (Corporate)enumerator.Current; c.print(); } } }