SPList.GetItemByUniqueId method
Gets the list item by GUID.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function GetItemByUniqueId ( _
uniqueId As Guid _
) As SPListItem
'Usage
Dim instance As SPList
Dim uniqueId As Guid
Dim returnValue As SPListItem
returnValue = instance.GetItemByUniqueId(uniqueId)
public SPListItem GetItemByUniqueId(
Guid uniqueId
)
Parameters
uniqueId
Type: System.GuidThe GUID of the list item.
Return value
Type: Microsoft.SharePoint.SPListItem
The list item.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The list item does not exist. -or- The list is not a user information list. |