Share via


SPFarmManagedAccountCollection.CopyTo method

Copies the items in the collection into an array beginning at a specified start index in the array.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
Public Sub CopyTo ( _
    array As SPManagedAccount(), _
    arrayIndex As Integer _
)
'Usage
Dim instance As SPFarmManagedAccountCollection
Dim array As SPManagedAccount()
Dim arrayIndex As Integer

instance.CopyTo(array, arrayIndex)
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
public void CopyTo(
    SPManagedAccount[] array,
    int arrayIndex
)

Parameters

  • array
    Type: []

    The array to which the collection is copied.

  • arrayIndex
    Type: System.Int32

    The start index in the array to receive the first copied item.

Implements

ICollection<T>.CopyTo([], Int32)

Exceptions

Exception Condition
OverflowException

The size of the collection is greater than the size of array from arrayIndex to the end of array.

Remarks

arrayIndex cannot refer to an element outside the array boundary.

See also

Reference

SPFarmManagedAccountCollection class

SPFarmManagedAccountCollection members

Microsoft.SharePoint.Administration namespace