Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the value associated with the specified key.
Namespace: Microsoft.SharePoint.Taxonomy.Generic
Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
Syntax
'Declaration
Public Function TryGetValue ( _
key As TKey, _
<OutAttribute> ByRef value As TValue _
) As Boolean
'Usage
Dim instance As ReadOnlyDictionary
Dim key As TKey
Dim value As TValue
Dim returnValue As Boolean
returnValue = instance.TryGetValue(key, _
value)
public bool TryGetValue(
TKey key,
out TValue value
)
Parameters
key
Type: TKeyThe key of the value to get
value
Type: TValueWhen this method returns, it contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Return Value
Type: System.Boolean
true if the current ReadOnlyDictionary object contains an element with the specified key; otherwise, false
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | key is a a null reference (Nothing in Visual Basic) reference |
See Also
Reference
ReadOnlyDictionary<TKey, TValue> Class