System.Collections.Queue.QueueEnumerator.MoveNext C# (CSharp) Method

MoveNext() public method

public MoveNext ( ) : bool
return bool
            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;
            }