Table of Contents

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

dictionary IDictionary<T, U>

Dictionary to add to

key T

Key to add

value U

Value to add

Type Parameters

T

Type of the dictionary key

U

Type of the dictionary value