다음을 통해 공유


SPPersistedObjectCollection<T>.GetValue<U> Method (Guid)

Retrieves an object from the collection with the specified ID and type.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Function GetValue(Of U As SPPersistedObject) ( _
    id As Guid _
) As U
'Usage
Dim instance As SPPersistedObjectCollection
Dim id As Guid
Dim returnValue As U

returnValue = instance.GetValue(id)
public U GetValue<U>(
    Guid id
)
where U : SPPersistedObject

Type Parameters

  • U
    The type of the object to retrieve.

Parameters

  • id
    Type: System.Guid

    A System.Guid object that identifies the object in the collection.

Return Value

Type: U
The object, if it exists; otherwise, a null reference (Nothing in Visual Basic).

See Also

Reference

SPPersistedObjectCollection<T> Class

SPPersistedObjectCollection<T> Members

GetValue Overload

Microsoft.SharePoint.Administration Namespace