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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public ReadOnly Property Item ( _
iIndex As Integer _
) As SPListItem
Get
'Usage
Dim instance As SPListItemCollection
Dim iIndex As Integer
Dim value As SPListItem
value = instance.Item(iIndex)
public SPListItem this[
int iIndex
] { get; }
Parameters
iIndex
Type: System.Int32A 32-bit integer that specifies the item’s index in the collection.
Property Value
Type: Microsoft.SharePoint.SPListItem
The item.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | The specified index is outside the valid range of indices for the collection. |
Remarks
An item’s index in the collection cannot be obtained by accessing the item’s ID property.