Search
IEnumerable.copyTo Method
See Also
Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: None Language Filter: C# Language Filter: Visual Basic Language Filter: Java Language Filter: JavaScript Language Filter: C++ Language Filter: XAML
C#
Visual Basic
Java
JavaScript
C++
XAML
Introduction
General Information
What's New In This Release
Version History
Getting Started
Code Completion With VSDoc IntelliSense
Programming Interface Overview
Tutorials
Reference
MindFusion.Common
MindFusion.Common.Collections
IEnumerable Class
IEnumerable Members
IEnumerable Constructor
IEnumerable Methods
add Method
addRange Method
clear Method
clone Method
contains Method
copyTo Method
count Method
first Method
forEach Method
indexOfItem Method
insert Method
item Method
items Method
last Method
max Method
min Method
remove Method
removeAt Method
removeRange Method
reverse Method
select Method
sort Method
sum Method
toArray Method
where Method
List Class
ObservableCollection Class
MindFusion.Controls
MindFusion.Scheduling
Licensing
Online Resources
Technical Support
MindFusion Products

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

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

## Syntax

JavaScript Copy Code
function copyTo (destination, length, [sourceIndex, [destinationIndex]])

### Parameters

destination

  IEnumerable. The destination collection.

length

  Number. The length of the range to copy.

sourceIndex
  Optional.

  Number. The starting index of the range to copy.

destinationIndex
  Optional.

  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