Share via


ComputerTargetCollection.Add Method (IComputerTarget)

 

Applies To: Windows Server Update Services

Adds a client computer to the end of the collection.

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

Syntax

public int Add(
    IComputerTarget value
)
public:
int Add(
    IComputerTarget^ value
)
member Add : 
        value:IComputerTarget -> int
Public Function Add (
    value As IComputerTarget
) As Integer

Parameters

Return Value

Type: System.Int32

Zero-based index at which the client computer was added to the collection.

Exceptions

Exception

Condition

ArgumentException

The client computer (value) already exists in this collection.

ArgumentNullException

value cannot be null reference (Nothing in Visual Basic).

Remarks

To add a collection of client computers to this collection, call AddRange.

See Also

Add Overload
ComputerTargetCollection Class
Microsoft.UpdateServices.Administration Namespace

Return to top