Class DictionaryExtensions
Extension methods for IDictionary<TKey,TValue>.
Inherited Members
Namespace: SixLabors.ImageSharp.Web.Commands
Assembly: SixLabors.ImageSharp.Web.dll
Syntax
public static class DictionaryExtensions
Methods
| Improve this Doc View SourceGetValueOrDefault<TValue, TKey>(IDictionary<TKey, TValue>, TKey)
Gets the value associated with the specified key or the default value.
Declaration
public static TValue GetValueOrDefault<TValue, TKey>(this IDictionary<TKey, TValue> dictionary, TKey key)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<TKey, TValue> | dictionary | The dictionary instance. |
TKey | key | The key of the value to get. |
Returns
Type | Description |
---|---|
TValue | The value associated with the specified key or the default value. |
Type Parameters
Name | Description |
---|---|
TValue | The value type. |
TKey | The key type. |