MessagePackObjectDictionaryAdd Method |
Adds the specified key and value to the dictionary.
Namespace: MsgPackAssembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax public void Add(
MessagePackObject key,
MessagePackObject value
)
Public Sub Add (
key As MessagePackObject,
value As MessagePackObject
)
public:
virtual void Add(
MessagePackObject key,
MessagePackObject value
) sealed
abstract Add :
key : MessagePackObject *
value : MessagePackObject -> unit
override Add :
key : MessagePackObject *
value : MessagePackObject -> unit
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 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