public bool MoveNext()
            {
                if ((_hashtableContentsToEnumerate != null) && (_index < _hashtableContentsToEnumerate.Length))
                {
                    for (; _index < _hashtableContentsToEnumerate.Length; _index++)
                    {
                        if (_hashtableContentsToEnumerate[_index] != IntPtr.Zero)
                        {
                            _current = _hashtable.ConvertIntPtrToValue(_hashtableContentsToEnumerate[_index]);
                            _index++;
                            return(true);
                        }
                    }
                }

                _current = default(TValue);
                return(false);
            }
Пример #2
0
            public bool MoveNext()
            {
                if ((_hashtableContentsToEnumerate != null) && (_index < _hashtableContentsToEnumerate.Length))
                {
                    for (; _index < _hashtableContentsToEnumerate.Length; _index++)
                    {
                        IntPtr examineEntry = Volatile.Read(ref _hashtableContentsToEnumerate[_index]);
                        if ((examineEntry != IntPtr.Zero) && (examineEntry != new IntPtr(1)))
                        {
                            _current = _hashtable.ConvertIntPtrToValue(examineEntry);
                            _index++;
                            return(true);
                        }
                    }
                }

                _current = default(TValue);
                return(false);
            }