ComputerTargetCollection

Collection of client computers.

To retrieve a collection of client computers, call one of the following methods:

The ComputerTargetCollection class is derived from the Microsoft.UpdateServices.Administration.WsusCollection class.

Public Constructors

The ComputerTargetCollection class has the following public constructor.

Constructor Description
ComputerTargetCollection()

Initializes a new instance of the ComputerTargetCollection class.

Public Methods

The ComputerTargetCollection class has the following public methods.

Method Description
Add(IComputerTarget)

Adds a client computer to the end of the collection.

AddRange(ComputerTargetCollection)

Adds the members of a collection of computers to the end of this collection.

AddRange(IComputerTarget[])

Adds the elements of an array of computers to the end of this collection.

Clear()

Removes all objects from the CollectionBase instance.

Contains(IComputerTarget)

Determines if the collection contains the specified client computer.

CopyTo(IComputerTarget[], Int32)

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

Equals(Object)

Determines if the specified Object is equal to the current Object.

Equals(Object, Object)

Static (Shared). Determines whether the specified Object instances are considered equal.

GetEnumerator()

Retrieves an enumerator that iterates through the CollectionBase instance.

GetHashCode()

Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.

GetType()

Retrieves the Type of the current instance.

IndexOf(IComputerTarget)

Determines if the collection contains the specified client computer.

Insert(Int32, IComputerTarget)

Inserts a client computer into the collection.

ReferenceEquals(Object, Object)

Static (Shared). Determines if the specified Object instances are the same instance.

Remove(IComputerTarget)

Removes a client computer from the collection.

RemoveAt(Int32)

Removes the member at the specified index of the CollectionBase instance.

ToString()

Retrieves a String that represents the current Object.

Public Properties

The ComputerTargetCollection class has the following public properties.

Property Description
Count

Retrieves the number of members in the collection.

Item

Retrieves or sets the member of the collection at the specified index.

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.