public override E Get(int location) { if (modCount == fullList.modCount) { if (0 <= location && location < size) { return(fullList.Get(location + offset)); } throw new IndexOutOfRangeException(); } throw new ConcurrentModificationException(); }
public E Next() { if (expectedModCount != parent.modCount) { throw new ConcurrentModificationException(); } try { int index = parent.Size() - numLeft; E result = parent.Get(index); lastPosition = index; numLeft--; return(result); } catch (IndexOutOfRangeException) { throw new NoSuchElementException(); } }