WsusCollection.CopyTo Method (Array, Int32)

 

Applies To: Windows Server Update Services

Copies the entire collection of values to a one-dimensional array, starting at the specified index of the target array.

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

Syntax

protected void CopyTo(
    Array array,
    int index
)
protected:
void CopyTo(
    Array^ array,
    int index
)
member CopyTo : 
        array:Array *
        index:int -> unit
Protected Sub CopyTo (
    array As Array,
    index As Integer
)

Parameters

  • array
    Type: System.Array

    The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.

  • index
    Type: System.Int32

    The zero-based index in array at which copying begins.

Exceptions

Exception

Condition

ArgumentOutOfRangeException

index is less than zero.

ArgumentNullException

array is a null reference (Nothing in Visual Basic).

ArgumentException

You can receive this exception because of either of the following reasons:

  • index is equal to or greater than the length of array.

  • The number of elements in the source collection is greater than the available space from index to the end of the destination array.

See Also

WsusCollection Class
Microsoft.UpdateServices.Administration Namespace

Return to top