Table of Contents

Class DictionaryExtensions

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

Provides extension methods for dictionaries.

public static class DictionaryExtensions
Inheritance
DictionaryExtensions
Inherited Members

Methods

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

Gets the value at the given key, or a default value.

public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)

Parameters

dictionary IDictionary<TKey, TValue>

The dictionary to retrieve the value from.

key TKey

The key to retrieve the value for.

Returns

TValue

The value associated with the specified key, or the default value if the key is not found.

Type Parameters

TKey

The type of the keys in the dictionary.

TValue

The type of the values in the dictionary.