MindFusion.Charting for JavaScript Programmer's Guide
IEnumerable.copyTo Method
See Also
 






Copies a range of elements from this collection to a destination collection.

Namespace: MindFusion.Common.Collections
File: IEnumerable.js

 Syntax

JavaScript  Copy Code

function copyTo (destination, length, [sourceIndex, [destinationIndex]])

 Parameters

destination

IEnumerable. The destination collection.

length

Type: Number
Number. The length of the range to copy.

sourceIndex
Optional.

Type: Number
Number. The starting index of the range to copy.

destinationIndex
Optional.

Type: Number
Number. The index at which the range should be copied.

 Example

The following example copies all items from a collection called janEvents at the end of a collection called febEvents:

JavaScript  Copy Code
janEvents.items.copyTo(febEvents, janEvents.count(), 0, febEvents.count() - 1);

 See Also

IEnumerable Members
IEnumerable Class
MindFusion.Common.Collections Namespace