System.Collections.Specialized.OrderedDictionary.OrderedDictionaryKeyValueCollection.ICollection C# (CSharp) Method

ICollection() private method

private ICollection ( Array array, int index ) : void
array Array
index int
return void
            void ICollection.CopyTo(Array array, int index)
            {
                if (array == null)
                    throw new ArgumentNullException(nameof(array));
                if (index < 0)
                    throw new ArgumentOutOfRangeException(nameof(index), index, SR.ArgumentOutOfRange_NeedNonNegNum);
                foreach (object o in _objects)
                {
                    array.SetValue(_isKeys ? ((DictionaryEntry)o).Key : ((DictionaryEntry)o).Value, index);
                    index++;
                }
            }
OrderedDictionary.OrderedDictionaryKeyValueCollection