PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsAdvisable­Hash­Set<T>Copy­To
Open sandboxFocus

AdvisableHashSet<T>.CopyTo Method

CopyTo(T[], Int32)

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

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[], Int32, Int32)

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.

Int32 arrayIndex

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

Int32 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.