Export (0) Print
Expand All

SortedList(Of TKey, TValue).ICollection(Of KeyValuePair(Of TKey, TValue)).CopyTo Method

Copies the elements of the ICollection(Of T) to an Array, starting at a particular Array index.

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

'Declaration
Private Sub CopyTo ( _
	array As KeyValuePair(Of TKey, TValue)(), _
	arrayIndex As Integer _
) Implements ICollection(Of KeyValuePair(Of TKey, TValue)).CopyTo

Parameters

array
Type: System.Collections.Generic.KeyValuePair(Of TKey, TValue)()

The one-dimensional Array that is the destination of the elements copied from ICollection(Of T). The Array must have zero-based indexing.

arrayIndex
Type: System.Int32

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

Implements

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

ExceptionCondition
ArgumentNullException

array is Nothing.

ArgumentOutOfRangeException

arrayIndex is less than zero.

ArgumentException

The number of elements in the source ICollection(Of T) is greater than the available space from arrayIndex to the end of the destination array.

This method determines equality using the default comparer Comparer(Of T).Default for System.Collections.Generic.KeyValuePair(Of TKey, TValue).

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft