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)

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    uniqueId As Guid _
) As SPListItem
    Get
'Usage
Dim instance As SPListItemCollection
Dim uniqueId As Guid
Dim value As SPListItem

value = instance(uniqueId)
public SPListItem this[
    Guid uniqueId
] { get; }

Parameters

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.

See also

Reference

SPListItemCollection class

SPListItemCollection members

Item overload

Microsoft.SharePoint namespace