SPListItemCollection.Item Property (Guid)
Gets the item object with the specified GUID from 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 ( _
uniqueId As Guid _
) As SPListItem
Get
'Usage
Dim instance As SPListItemCollection
Dim uniqueId As Guid
Dim value As SPListItem
value = instance.Item(uniqueId)
public SPListItem this[
Guid uniqueId
] { get; }
Parameters
uniqueId
Type: System.GuidThe value of the item’s UniqueId property.
Property Value
Type: Microsoft.SharePoint.SPListItem
The item.
Exceptions
Exception | Condition |
---|---|
NotSupportedException | The list has an external data source. |
ArgumentException | The collection does not contain an item with that GUID. |
Remarks
This indexer is not supported for lists that have an external data source. Use the Item[Int32] indexer instead.