Adds the value to the dictionary if it does not already exist.

Namespace:  Sasa.Collections
Assembly:  Sasa (in Sasa.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function Insert(Of K, T) ( _
	d As IDictionary(Of K, T), _
	key As K, _
	value As T _
) As Boolean
C#
public static bool Insert<K, T>(
	IDictionary<K, T> d,
	K key,
	T value
)
Visual C++
public:
generic<typename K, typename T>
static bool Insert(
	IDictionary<K, T>^ d, 
	K key, 
	T value
)
JavaScript
JavaScript does not support generic types or methods.

Parameters

d
Type: System.Collections.Generic..::.IDictionary<(Of <(K, T>)>)
The dictionary.
key
Type: K
The dictionary key.
value
Type: T
The value to insert.

Type Parameters

K
The type of the key.
T
The type of the value.

Return Value

True if the item was inserted, false if the key already exists.

See Also