Click or drag to resize
MessagePackObjectDictionaryAdd Method
Adds the specified key and value to the dictionary.

Namespace: MsgPack
Assembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax
public void Add(
	MessagePackObject key,
	MessagePackObject value
)

Parameters

key
Type: MsgPackMessagePackObject
The key of the element to add.
value
Type: MsgPackMessagePackObject
The value of the element to add. The value can be null for reference types.

Return Value

Type: 
An element with the same key already does not exist in the dictionary and sucess to add then newly added node; otherwise null.

Implements

IDictionaryTKey, TValueAdd(TKey, TValue)
Exceptions
ExceptionCondition
ArgumentExceptionkey already exists in this dictionary. Note that tiny integers are considered equal regardless of its CLI Type, and UTF-8 encoded bytes are considered equals to String.
ArgumentNullExceptionkey is Nil.
Remarks
If Count is less than the capacity, this method approaches an O(1) operation. If the capacity must be increased to accommodate the new element, this method becomes an O(N) operation, where N is Count.
See Also