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)
Syntax
'Declaration
Public ReadOnly Default Property Item ( _
iIndex As Integer _
) As SPListItem
Get
'Usage
Dim instance As SPListItemCollection
Dim iIndex As Integer
Dim value As SPListItem
value = instance(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.