다음을 통해 공유


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

Copies the internal collection to the specified 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 Array, _
    index As Integer _
)
'Usage
Dim instance As GenericCollection
Dim array As Array
Dim index As Integer

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

Parameters

  • array
    Type: System.Array

    Array to copy the collection data to

  • index
    Type: System.Int32

    Index of array at which to start copying the data

Implements

ICollection.CopyTo(Array, Int32)

Exceptions

Exception Condition
ArgumentException

The array is not large enough to hold copied data.

ArgumentNullException

Occurs if array is a null reference (Nothing in Visual Basic)

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