HashSet<T>.CopyTo Method (T[], Int32, Int32)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Copies the specified number of elements of a HashSet<T> object to an array, starting at the specified array index.
Assembly: System.Core (in System.Core.dll)
Parameters
- array
- Type:
T
[]
The one-dimensional array that is the destination of the elements copied from the HashSet<T> object. The array must have zero-based indexing.
- arrayIndex
- Type: System.Int32
The zero-based index in array at which copying begins.
- count
- Type: System.Int32
The number of elements to copy to array.
| Exception | 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 index to the end of the destination array. |
Show: