Exemplo n.º 1
0
            public bool MoveNext()
            {
                _index++;

                if (_index == _count)
                {
                    _index   = 0;
                    _current = default;
                    return(false);
                }

                int capacity   = _buffer.Length;
                int arrayIndex = _offset + _index;

                if (arrayIndex >= capacity)
                {
                    arrayIndex -= capacity; // wrap around if needed
                }

                _current = _buffer.Element <T>(arrayIndex);
                return(true);
            }