VirtualCollectionTCopyTo Method

Copies the entire VirtualCollectionT to a compatible one-dimensional Array, starting at the specified arrayIndex of the target array.
Calls the overridable GetItem method for each index between zero and Count, excluding upper bound.

Definition

Namespace: KGySoft.Collections.ObjectModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public void CopyTo(
	T[] array,
	int arrayIndex
)

Parameters

array  T
The one-dimensional Array that is the destination of the elements copied from VirtualCollectionT. The Array must have zero-based indexing.
arrayIndex  Int32
The zero-based index in array at which copying begins.

Implements

ICollectionTCopyTo(T, Int32)

Exceptions

ArgumentNullExceptionarray is .
ArgumentOutOfRangeExceptionarrayIndex is less than 0 equal to or greater than the length of array.
ArgumentExceptionThe number of elements in the source list is greater than the available space from arrayIndex to the end of the destination array.

See Also