Share via


SPPersistedObjectCollection<T>.GetValue<U> method (String)

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

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

Syntax

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

returnValue = instance.GetValue(name)
public U GetValue<U>(
    string name
)
where U : SPPersistedObject

Type parameters

  • U
    The type of the object to retrieve.

Parameters

  • name
    Type: System.String

    The name of an 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