Partager via


WsusCollection.Item Property (Int32)

 

Applies To: Windows Server Update Services

Gets or sets the element at the specified index. In C#, this property is the indexer for the collection.

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

Syntax

protected object this[
    int index
] { get; set; }
protected:
property Object^ default[
    int index
] {
    Object^ get(int index);
    void set(int index, Object^ value);
}
member Item : 
        index:int -> Object with get, set
Protected Property Item (
    index As Integer
) As Object

Parameters

  • index
    Type: System.Int32

    The zero-based index of the element to get or set.

Property Value

Type: System.Object

The element at the specified index.

Exceptions

Exception

Condition

ArgumentOutOfRangeException

You can receive this exception because of either of the following reasons:

  • index is less than zero

  • index is equal or greater than Count

ArgumentNullException

Attempted to set the value to null.

ArgumentException

Attempted set to a value already in the collection at a different index.

See Also

WsusCollection Class
Microsoft.UpdateServices.Administration Namespace

Return to top