SPKeyValuePairSerializationInfo.TryGetValue<T> method (String, T)
Retrieves a value from the SPKeyValuePairSerializationInfo store based on the specified type and name.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function TryGetValue(Of T) ( _
name As String, _
<OutAttribute> ByRef value As T _
) As Boolean
'Usage
Dim instance As SPKeyValuePairSerializationInfo
Dim name As String
Dim value As T
Dim returnValue As Boolean
returnValue = instance.TryGetValue(name, _
value)
public bool TryGetValue<T>(
string name,
out T value
)
Type parameters
- T
The type of the value to be retrieved.
Parameters
name
Type: System.StringThe name associated with the value to be retrieved.
value
Type: TThe object of the specified type that is associated with the specified name, if it is found in the store; otherwise, the default value for the specified type.
Return value
Type: System.Boolean
Returns true if the store contains a value with the specified name; otherwise, this method returns false.
Remarks
If the name parameter is null, an exception of type System.ArgumentNullException is thrown.
See also
Reference
SPKeyValuePairSerializationInfo class