ScintillaNET.LineCollection.CopyTo C# (CSharp) Method

CopyTo() public method

public CopyTo ( Array array, int index ) : void
array System.Array
index int
return void
        public void CopyTo(Array array, int index)
        {
            if(array == null)
                throw new ArgumentNullException("array");

            if(index < 0)
                throw new ArgumentOutOfRangeException("index");

            if(index >= array.Length)
                throw new ArgumentException("index is equal to or greater than the _length of array.");

            int count = Count;
            if(count > array.Length - index)
                throw new ArgumentException("The number of elements in the source ICollection is greater than the available space from number to the _end of the destination array.");

            for(int i=index; i<count; i++)
                array.SetValue(this[i], i);
        }