Mono Class Library: System.Collections.ArrayList Overview | Members

System.Collections.ArrayList.Item Property

Gets or sets the element at the specified index of the current instance.

This is the default property for this class.

public virtual object this [int index] { set; get; }

Parameters

index
A int that specifies the zero-based index of the element in the current instance to get or set. This value is greater than or equal to 0, and less than the ArrayList.Count of the current instance.

Value

The element at the specified index of the current instance.

Exceptions

TypeReason
ArgumentOutOfRangeException

index < 0.

-or-

index >= ArrayList.Count of the current instance.

Remarks

Note:

This property provides the ability to access a specific element in the collection by using the following syntax: myCollection[index] .

This property is implemented to support the IList interface.

Operation
As described above.

Requirements

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0