Export (0) Print
Expand All

ImmutableDictionary(Of TKey, TValue).IDictionary(Of TKey, TValue).Add Method

Adds an element with the provided key and value to the immutable dictionary.

Namespace:  System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

'Declaration
Private Sub Add ( _
	key As TKey, _
	value As TValue _
) Implements IDictionary(Of TKey, TValue).Add

Parameters

key
Type: TKey

The object to use as the key of the element to add.

value
Type: TValue

The object to use as the value of the element to add.

Implements

IDictionary(Of TKey, TValue).Add(TKey, TValue)

ExceptionCondition
ArgumentNullException

key is null.

ArgumentException

An element with the same key already exists in the dictionary.

NotSupportedException

The dictionary is read-only.

This member is an explicit interface member implementation. It can be used only when the ImmutableDictionary(Of TKey, TValue) instance is cast to an IDictionary(Of TKey, TValue) interface.

Show:
© 2014 Microsoft