Open sandboxFocus

Method CopyTo

CopyTo(T[], int)

Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type Name Description
T[] array
int arrayIndex
Implements

CopyTo(T[])

Copies the elements of an AdvisableHashSet<T> object to an array.

Declaration
public void CopyTo(T[] array)
Parameters
Type Name Description
T[] array

The one-dimensional array that is the destination of the elements copied from the AdvisableHashSet<T> object. The array must have zero-based indexing.

Exceptions
Type Condition
ArgumentNullException

array is null.

CopyTo(T[], int, int)

Copies the specified number of elements of an AdvisableHashSet<T> object to an array, starting at the specified array index.

Declaration
public void CopyTo(T[] array, int arrayIndex, int count)
Parameters
Type Name Description
T[] array

The one-dimensional array that is the destination of the elements copied from the AdvisableHashSet<T> object. The array must have zero-based indexing.

int arrayIndex

The zero-based index in array at which copying begins.

int count

The number of elements to copy to array.

Exceptions
Type Condition
ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is less than 0.

-or-

count is less than 0.

ArgumentException

arrayIndex is greater than the length of the destination array.

-or-

count is greater than the available space from the arrayIndex to the end of the destination array.