다음을 통해 공유


GenericCollection<T>.CopyTo Method (T , Int32)

Copies the internal collection to the given array starting at the specified index.

Namespace:  Microsoft.SharePoint.Taxonomy.Generic
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

Syntax

'Declaration
<PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
Public Sub CopyTo ( _
    array As T(), _
    index As Integer _
)
'Usage
Dim instance As GenericCollection
Dim array As T()
Dim index As Integer

instance.CopyTo(array, index)
[PermissionSetAttribute(SecurityAction.Demand, Name = "FullTrust")]
public void CopyTo(
    T[] array,
    int index
)

Parameters

  • array
    Type: []

    Array to copy the collection data to.

  • index
    Type: System.Int32

    Index of array at which to start copying the data.

Exceptions

Exception Condition
ArgumentException

The array is not large enough to hold copied data

ArgumentNullException

Occurs if array is null

ArgumentOutOfRangeException

Occurs if the index is less than zero

See Also

Reference

GenericCollection<T> Class

GenericCollection<T> Members

CopyTo Overload

Microsoft.SharePoint.Taxonomy.Generic Namespace