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 GetValueOrDefault<TActualValue>(
this IEnumerable<KeyValuePair<string, Object>> dictionary,
string key,
TActualValue defaultValue = null
)
<ExtensionAttribute>
Public Shared Function GetValueOrDefault(Of TActualValue) (
dictionary As IEnumerable(Of KeyValuePair(Of String, Object)),
key As String,
Optional defaultValue As TActualValue = Nothing
) As TActualValue
public:
[ExtensionAttribute]
generic<typename TActualValue>
static TActualValue GetValueOrDefault(
IEnumerable<KeyValuePair<String^, Object^>>^ dictionary,
String^ key,
TActualValue defaultValue = nullptr
)
[<ExtensionAttribute>]
static member GetValueOrDefault :
dictionary : IEnumerable<KeyValuePair<string, Object>> *
key : string *
?defaultValue : 'TActualValue
(* Defaults:
let _defaultValue = defaultArg defaultValue null
*)
-> 'TActualValue