Condividi tramite


IReadOnlyDictionary<TKey, TValue>.TryGetValue Method

Determines whether a specified value is stored at a specified key in the dictionary.

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

Syntax

'Declaration
Function TryGetValue ( _
    key As TKey, _
    <OutAttribute> ByRef value As TValue _
) As Boolean
'Usage
Dim instance As IReadOnlyDictionary
Dim key As TKey
Dim value As TValue
Dim returnValue As Boolean

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

Parameters

  • key
    Type: TKey

    The specified key.

  • value
    Type: TValue

    The value to search for at the specified key.

Return Value

Type: System.Boolean
true if the value is found; otherwise, false.

See Also

Reference

IReadOnlyDictionary<TKey, TValue> Interface

IReadOnlyDictionary<TKey, TValue> Members

Microsoft.BusinessData.Infrastructure.Collections Namespace