Spread Windows Forms 7.0 Product Documentation
CopyTo Method
See Also  Support Options
GrapeCity.Win.PluginInputMan Assembly > GrapeCity.Win.Spread.InputMan.CellType Namespace > CollectionBase<T> Class : CopyTo Method


array
The one-dimensional System.Array that is the destination of the values copied from the collection.
index
The index of the array at which to begin inserting.

Glossary Item Box

Copies the collection objects to a one-dimensional System.Array instance beginning at the specified index.

Syntax

Visual Basic (Declaration) 
Public Sub CopyTo( _
   ByVal array() As T, _
   ByVal index As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As CollectionBase(Of T)
Dim array() As T
Dim index As Integer
 
instance.CopyTo(array, index)
C# 
public void CopyTo( 
   T[] array,
   int index
)

Parameters

array
The one-dimensional System.Array that is the destination of the values copied from the collection.
index
The index of the array at which to begin inserting.

Exceptions

ExceptionDescription
System.ArgumentNullException The array parameter is null.
System.ArgumentOutOfRangeException The index parameter is less than the target array's minimum index.
System.ArgumentExceptionThe destination array is multidimensional.-or- The number of elements in the Collection<T> is greater than the available space between the index of the target array specified by the index parameter and the end of the target array.

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.