SPListItemCollection.Item property (Int32)

Gets the list item at the specified index in the collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public SPListItem this[
	int iIndex
] { get; }

Parameters

iIndex
Type: System.Int32

A 32-bit integer that specifies the item’s index in the collection.

Property value

Type: Microsoft.SharePoint.SPListItem
The item.

ExceptionCondition
ArgumentOutOfRangeException

The specified index is outside the valid range of indices for the collection.

An item’s index in the collection cannot be obtained by accessing the item’s ID property.

Show: