Algorithms..::..Copy<(Of <(<'T>)>)> Method (IEnumerable<(Of <(<'T>)>)>, IList<(Of <(<'T>)>)>, Int32, Int32)
Copies at most count items from the collection source to the list dest, starting
at the index destIndex. If necessary, the size of the destination list is expanded. The source collection must not be
the destination list or part thereof.
Namespace:
Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
public static void Copy<T>( IEnumerable<T> source, IList<T> dest, int destIndex, int count )
Public Shared Sub Copy(Of T) ( _ source As IEnumerable(Of T), _ dest As IList(Of T), _ destIndex As Integer, _ count As Integer _ )
public: generic<typename T> static void Copy( IEnumerable<T>^ source, IList<T>^ dest, int^ destIndex, int^ count )
Type Parameters
- T
Parameters
- source
- Type: IEnumerable<(Of <(<'T>)>)>
The collection that provide the source items.
- dest
- Type: IList<(Of <(<'T>)>)>
The list to store the items into.
- destIndex
- Type: Int32
The index to begin copying items to.
- count
- Type: Int32
The maximum number of items to copy.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | destIndex is negative or greater than dest.Count |
ArgumentOutOfRangeException | count is negative. |
ArgumentNullException | source or dest is null. |