ComputerTargetGroupCollection.Add(IComputerTargetGroup)
Adds an existing target group to the end of the collection.
public Int32 Add(IComputerTargetGroupvalue);
Public Function Add( _
ByVal value As IComputerTargetGroup _
) As Int32
Parameters
- value
An IComputerTargetGroup of the target group to add.
Return Value
Zero-based index at which the target group was added to the collection.
Exceptions
Exception type | Condition |
---|---|
System.ArgumentException | The target group already exists in the collection. |
System.ArgumentNullException | value cannot be null. |
Remarks
You can use this method to build a specific target group collection to pass to IAutomaticUpdateApprovalRule.SetComputerTargetGroups.
To create a target group, call IUpdateServer.CreateComputerTargetGroup.
Requirements
Server | Requires Windows Server 2003 or Windows 2000 Server SP4 and later. |
Namespace | Defined in Microsoft.UpdateServices.Administration. |
Assembly | Requires Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll). |
.NET Framework | Requires .NET Framework 1.1. |
See Also
IUpdateServer.CreateComputerTargetGroup
ComputerTargetGroupCollection.AddRange