public static TValue GetValueOrDefault<TKey, TValue>(
IDictionary<TKey, TValue> dictionary,
TKey key
)
Public Shared Function GetValueOrDefault(Of TKey, TValue) (
dictionary As IDictionary(Of TKey, TValue),
key As TKey
) As TValue
public:
generic<typename TKey, typename TValue>
static TValue GetValueOrDefault(
IDictionary<TKey, TValue>^ dictionary,
TKey key
)
static member GetValueOrDefault :
dictionary : IDictionary<'TKey, 'TValue> *
key : 'TKey -> 'TValue
This method can be used as an extension method when targeting .NET Framework/.NET Standard 2.0 but is a regular method when targeting .NET Core 2.0/.NET Standard 2.1 or later to avoid collision with the similar extension method in .NET Core 2.0 and above.