CopyTo Method (T[], Int32)
Collapse the table of content
Expand the table of content

SortedSet(Of T).CopyTo Method (T(), Int32)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Copies the complete SortedSet(Of T) to a compatible one-dimensional array, starting at the specified array index.

Namespace:  System.Collections.Generic
Assembly:  System (in System.dll)

'Declaration
Public Sub CopyTo ( _
	array As T(), _
	index As Integer _
)

Parameters

array
Type: T ()
A one-dimensional array that is the destination of the elements copied from the SortedSet(Of T). The array must have zero-based indexing.
index
Type: System.Int32
The zero-based index in array at which copying begins.

Implements

ICollection(Of T).CopyTo(T(), Int32)

ExceptionCondition
ArgumentException

The number of elements in the source array is greater than the available space from index to the end of the destination array.

ArgumentNullException

array is Nothing.

ArgumentOutOfRangeException

index is less than zero.

This method is an O(n) operation, where n is Count.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft