Partilhar via


QueryBasedCollection<T>.Item Property (Guid)

Gets an item by its unique identifier (ID).

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

Syntax

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

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

Parameters

Property Value

Type: T
The item matching the unique ID.

Exceptions

Exception Condition
ArgumentNullException

The UniqueId parameter cannot be a null reference (Nothing in Visual Basic).

ArgumentException

The UniqueId is not valid.

See Also

Reference

QueryBasedCollection<T> Class

QueryBasedCollection<T> Members

Item Overload

Microsoft.SharePoint.Publishing Namespace

Item

Item

UniqueId

Item