System.Xml.Schema.XmlSchemaCollection.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));
            for (XmlSchemaCollectionEnumerator e = this.GetEnumerator(); e.MoveNext();)
            {
                if (index == array.Length)
                {
                    throw new ArgumentOutOfRangeException(nameof(index));
                }
                array.SetValue(e.Current, index++);
            }
        }