Note
If dictionary is neither an IDictionaryTKey, TValue, nor an IReadOnlyDictionaryTKey, TValue instance,
then a sequential lookup is performed using a default equality comparer on the keys.
public static TActualValue GetActualValueOrDefault<TKey, TValue, TActualValue>(
this IEnumerable<KeyValuePair<TKey, TValue>> dictionary,
TKey key,
Func<TActualValue> defaultValueFactory
)
where TActualValue : TValue
<ExtensionAttribute>
Public Shared Function GetActualValueOrDefault(Of TKey, TValue, TActualValue As TValue) (
dictionary As IEnumerable(Of KeyValuePair(Of TKey, TValue)),
key As TKey,
defaultValueFactory As Func(Of TActualValue)
) As TActualValue
public:
[ExtensionAttribute]
generic<typename TKey, typename TValue, typename TActualValue>
where TActualValue : TValue
static TActualValue GetActualValueOrDefault(
IEnumerable<KeyValuePair<TKey, TValue>>^ dictionary,
TKey key,
Func<TActualValue>^ defaultValueFactory
)
[<ExtensionAttribute>]
static member GetActualValueOrDefault :
dictionary : IEnumerable<KeyValuePair<'TKey, 'TValue>> *
key : 'TKey *
defaultValueFactory : Func<'TActualValue> -> 'TActualValue when 'TActualValue : 'TValue