TDictionary<TKey,TValue>.GetValueOrDefault(TKey) Method

Gets the value for a given key if a matching key exists in the dictionary; returns the default value otherwise.

Namespace: Spring.Collections.Dictionaries
public
 function GetValueOrDefault(const key: TKey): TValue; overload;

Parameters

key
Type: TKey

Return Value

Type: TValue

 

Implements

IDictionary<TKey,TValue>.GetValueOrDefault(TKey)
IReadOnlyDictionary<TKey,TValue>.GetValueOrDefault(TKey)