Beispiel #1
0
        void ICollection <T> .CopyTo(T[] array, int arrayIndex)
        {
            ICollectionHelpers.ThrowIfInsufficientArray(this, array, arrayIndex);
            var iter = tree.GetEnumerator();

            for (int i = 0; i < tree.Count; i++)
            {
                iter.MoveNext();
                array[i] = iter.Current.Value;
            }
        }
Beispiel #2
0
        void ICollection <KeyValuePair <uint, T> > .CopyTo(KeyValuePair <uint, T>[] array, int arrayIndex)
        {
            ICollectionHelpers.ThrowIfInsufficientArray(this, array, arrayIndex);
            var iter = GetEnumerator();

            for (int i = 0; i < Count; i++)
            {
                iter.MoveNext();
                array[i] = iter.Current;
            }
        }