Class IDictionaryExtensions
- Namespace
- SunamoExtensions
- Assembly
- SunamoExtensions.dll
Extension methods for IDictionary interface
public static class IDictionaryExtensions
- Inheritance
-
IDictionaryExtensions
- Inherited Members
Methods
AddIfNotExists<T, U>(IDictionary<T, U>, T, U)
Adds a key-value pair to the dictionary only if the key doesn't already exist
public static void AddIfNotExists<T, U>(this IDictionary<T, U> dictionary, T key, U value)
Parameters
dictionaryIDictionary<T, U>Dictionary to add to
keyTKey to add
valueUValue to add
Type Parameters
TType of the dictionary key
UType of the dictionary value