ReadOnlyDictionary<TKey, TValue>.TryGetValue Method

Gets the value associated with the specified key.

Namespace:  Microsoft.SharePoint.BusinessData.Infrastructure.Collections.Client
Assembly:  Microsoft.SharePoint.BusinessData.Administration.Client (in Microsoft.SharePoint.BusinessData.Administration.Client.dll)


Public Function TryGetValue ( _
    key As TKey, _
    <OutAttribute> ByRef value As TValue _
) As Boolean
Dim instance As ReadOnlyDictionary
Dim key As TKey
Dim value As TValue
Dim returnValue As Boolean

returnValue = instance.TryGetValue(key, _
public bool TryGetValue(
    TKey key,
    out TValue value


  • key
    Type: TKey

    The key of the value to get.

  • value
    Type: TValue

    When this method returns, contains the value associated with the specified key, if the key is referenced in the Metadata Store; otherwise, contains a null reference (Nothing in Visual Basic). This parameter is passed uninitialized.

Return Value

Type: System.Boolean
true if the read-only dictionary contains an element with the specified key; otherwise, false.


IReadOnlyDictionary<TKey, TValue>.TryGetValue(TKey, TValue)

See Also


ReadOnlyDictionary<TKey, TValue> Class

ReadOnlyDictionary<TKey, TValue> Members

Microsoft.SharePoint.BusinessData.Infrastructure.Collections.Client Namespace