MessagePackObjectDictionaryTryGetValue Method |
Gets the value associated with the specified key.
Namespace: MsgPackAssembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax public bool TryGetValue(
MessagePackObject key,
out MessagePackObject value
)
Public Function TryGetValue (
key As MessagePackObject,
<OutAttribute> ByRef value As MessagePackObject
) As Boolean
public:
virtual bool TryGetValue(
MessagePackObject key,
[OutAttribute] MessagePackObject% value
) sealed
abstract TryGetValue :
key : MessagePackObject *
value : MessagePackObject byref -> bool
override TryGetValue :
key : MessagePackObject *
value : MessagePackObject byref -> bool
Parameters
- key
- Type: MsgPackMessagePackObject
The key whose value to get.
- value
- Type: MsgPackMessagePackObject
When this method returns, the value associated with the specified key, if the key is found;
otherwise, the default value for the type of the value parameter.
This parameter is passed uninitialized.
Return Value
Type:
Booleantrue if this dictionary contains an element with the specified key; otherwise,
false.
Implements
IDictionaryTKey, TValueTryGetValue(TKey, TValue)Exceptions Remarks
Note that tiny integers are considered equal regardless of its CLI Type,
and UTF-8 encoded bytes are considered equals to String.
This method approaches an O(1) operation.
See Also