Click or drag to resize

DictionaryExtensionsAddIfNotPresentTKey, TValue Method

Adds an element to the dictionary if it doesn't already contain an element with the key

Namespace:  Omada.OE.Model
Assembly:  Omada.OE.Model (in Omada.OE.Model.dll) Version: 15.0.0.0
Syntax
C#
public static void AddIfNotPresent<TKey, TValue>(
	this IDictionary<TKey, TValue> dictionary,
	TKey key,
	TValue value
)

Parameters

dictionary
Type: System.Collections.GenericIDictionaryTKey, TValue
key
Type: TKey
value
Type: TValue

Type Parameters

TKey
TValue

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDictionaryTKey, TValue. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also