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
array
Type: Microsoft.UpdateServices.Administration.IComputerTarget[]The one-dimensional array of Computers as the destination of the elements copied from ComputerTargetCollection. The Array must have zero-based indexing.
index
Type: System.Int32Zero-based index that specifies the location in the array at which to begin adding the client computer elements.
Exceptions
Exception
Condition
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
array is a null reference (Nothing in Visual Basic).
Index cannot be less than zero.
See Also
CopyTo Overload
ComputerTargetCollection Class
Microsoft.UpdateServices.Administration Namespace
Return to top