次の方法で共有


ComputerTargetCollection.CopyTo Method (IComputerTarget , Int32)

 

Applies To: Windows Server Update Services

Copies the client computers in the collection to a one-dimensional array.

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

Syntax

public void CopyTo(
    IComputerTarget[] array,
    int index
)
public:
void CopyTo(
    array<IComputerTarget^>^ array,
    int index
)
member CopyTo : 
        array:IComputerTarget[] *
        index:int -> unit
Public Sub CopyTo (
    array As IComputerTarget(),
    index As Integer
)

Parameters

  • index
    Type: System.Int32

    Zero-based index that specifies the location in the array at which to begin adding the client computer elements.

Exceptions

Exception

Condition

ArgumentException

Can occur because of either of the following reasons:

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

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

ArgumentNullException

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

ArgumentOutOfRangeException

 Index cannot be less than zero.

See Also

CopyTo Overload
ComputerTargetCollection Class
Microsoft.UpdateServices.Administration Namespace

Return to top