Share via


ListItemCollection.GetById method (Int32)

Returns the list item with the specified list item identifier.

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

Syntax

'Declaration
Public Function GetById ( _
    id As Integer _
) As ListItem
'Usage
Dim instance As ListItemCollection
Dim id As Integer
Dim returnValue As ListItem

returnValue = instance.GetById(id)
public ListItem GetById(
    int id
)

Parameters

Return value

Type: Microsoft.SharePoint.Client.ListItem
Returns a ListItem instance representing the list item with the specified list item identifier.

Exceptions

Exception Condition
ArgumentException

List item does not exist. Error code: -2147024809.

See also

Reference

ListItemCollection class

ListItemCollection members

GetById overload

Microsoft.SharePoint.Client namespace