NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

SortedList.CopyTo

Copies the SortedList values into a one-dimensional Array instance at the specified index.

[Visual Basic]
Overridable Public Sub CopyTo( _
   ByVal array As Array, _
   ByVal index As Integer _
)
[C#]
public virtual void CopyTo(
   Array array,
   int index
);
[C++]
public: virtual void CopyTo(
   Array* array,
   int index
);
[JScript]
public function CopyTo(
   array : Array,
   index : int
);

Parameters

array
The one-dimensional Array to contain the SortedList values.
index
The index in array at which to start copying.

Return Value

None.

Exceptions

Exception Type Condition
ArgumentException array is multidimensional.

-or-

The number of elements in the SortedList is greater than the available space between index and the end of array.

ArgumentNullException array is a null reference (in Visual Basic Nothing).
ArgumentOutOfRangeException index is less than array 's lowbound.

Remarks

This method can be overridden by a derived class.

CopyTo only copies the values in the SortedList, not the keys.

The elements of the new Array are sorted in the same order as the values of the SortedList.

See Also

SortedList Class | SortedList Members | System.Collections Namespace | Array