Share via


ComputerTargetCollection.Insert Method (Int32, IComputerTarget)

 

Applies To: Windows Server Update Services

Inserts a ComputerTarget into the ComputerTargetCollection at the specified index.

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

Syntax

public void Insert(
    int index,
    IComputerTarget value
)
public:
void Insert(
    int index,
    IComputerTarget^ value
)
member Insert : 
        index:int *
        value:IComputerTarget -> unit
Public Sub Insert (
    index As Integer,
    value As IComputerTarget
)

Parameters

  • index
    Type: System.Int32

    Zero-based index at which to insert the client computer value into the collection.

Exceptions

Exception

Condition

ArgumentException

The client computer already exists in this collection.

ArgumentNullException

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

ArgumentOutOfRangeException

index cannot be less than zero or greater than Count

See Also

Add
Insert Overload
ComputerTargetCollection Class
Microsoft.UpdateServices.Administration Namespace

Return to top