GetElement() private method

private GetElement ( int i ) : Object
i int
return Object
Ejemplo n.º 1
0
            public virtual bool MoveNext()
            {
                if (_version != _q._version)
                {
                    throw new InvalidOperationException(Environment.GetResourceString(ResId.InvalidOperation_EnumFailedVersion));
                }

                if (_index < 0)
                {
                    currentElement = _q._array;
                    return(false);
                }

                currentElement = _q.GetElement(_index);
                _index++;

                if (_index == _q._size)
                {
                    _index = -1;
                }
                return(true);
            }
Ejemplo n.º 2
0
            public virtual bool MoveNext()
            {
                if (_version != _q._version)
                {
                    throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
                }

                if (_index < 0)
                {
                    _currentElement = _q._array;
                    return(false);
                }

                _currentElement = _q.GetElement(_index);
                _index++;

                if (_index == _q._size)
                {
                    _index = -1;
                }
                return(true);
            }
Ejemplo n.º 3
0
            public bool MoveNext()
            {
                if (_version != _q._version)
                {
                    throw new InvalidOperationException("Invalid operation, version enumeration failed");
                }

                if (_index < 0)
                {
                    _currentElement = _q._array;
                    return(false);
                }

                _currentElement = _q.GetElement(_index);
                _index++;

                if (_index == _q._size)
                {
                    _index = -1;
                }
                return(true);
            }