Wintellect.PowerCollections Namespace
Algorithms Class
Algorithms Methods
GhostDoc Pro Sample Help File

Algorithms..::..Copy<(Of <(<'T>)>)> Method (IList<(Of <(<'T>)>)>, Int32, array<T>[]()[][], Int32, Int32)

Copies count items from the list or array source, starting at the index sourceIndex, to the array dest, starting at the index destIndex. The source may be the same as the destination array.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public static void Copy<T>(
	IList<T> source,
	int sourceIndex,
	T[] dest,
	int destIndex,
	int count
)
Public Shared Sub Copy(Of T) ( _
	source As IList(Of T), _
	sourceIndex As Integer, _
	dest As T(), _
	destIndex As Integer, _
	count As Integer _
)
public:
generic<typename T>
static void Copy(
	IList<T>^ source, 
	int^ sourceIndex, 
	array<T>^ dest, 
	int^ destIndex, 
	int^ count
)

Type Parameters

T

Parameters

source
Type: IList<(Of <(<'T>)>)>
The list or array that provide the source items.
sourceIndex
Type: Int32
The index within sourceto begin copying items from.
dest
Type: array<T>[]()[][]
The array to store the items into.
destIndex
Type: Int32
The index within destto begin copying items to.
count
Type: Int32
The maximum number of items to copy. The destination array must be large enough to hold this many items.

Exceptions


ExceptionCondition
ArgumentOutOfRangeExceptionsourceIndex is negative or greater than source.Count
ArgumentOutOfRangeExceptiondestIndex is negative or greater than dest.Length
ArgumentOutOfRangeExceptioncount is negative or too large.
ArgumentNullExceptionsource or dest is null.