Example #1
0
 /// <summary>
 /// Choose some item of this collection.
 /// </summary>
 /// <exception cref="CollectionModifiedException">if underlying collection has been modified.</exception>
 /// <exception cref="NoSuchItemException">if range is empty.</exception>
 /// <returns></returns>
 public override T Choose()
 {
     thebase.modifycheck(stamp);
     if (count == 0)
     {
         throw new NoSuchItemException();
     }
     return(thebase.array[start]);
 }
Example #2
0
                public override bool MoveNext()
                {
                    ArrayBase <T> list = _rangeEnumeratorArrayBase;

                    list.modifycheck(_theStamp);

                    if (_index < _count)
                    {
                        Current = list.array[_start + _delta * _index];
                        _index++;
                        return(true);
                    }

                    Current = default(T);
                    return(false);
                }