ConfigurationElementCollectionBase<T>.Item Property (Int32)

IIS 7.0
 

Gets a configuration element at the specified index.

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

public T this[
	int index
] { get; }

Parameters

index
Type: System.Int32

The zero-based index of the element to get.

Property Value

Type: T

The element at the specified index.

Exception Condition
ArgumentOutOfRangeException

index is less than 0.

-or-

index is equal to or greater than Count.

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

The C# language uses the this keyword to define the indexers instead of implementing the Item property. Visual Basic implements Item as a default property, which provides the same indexing functionality.

Return to top
Show: