![](../icons/Hazelcast-IMDG-Logo-Orange_Dark_200px.jpg) | IMapTKey, TValuePut Method (TKey, TValue) |
Associates the specified value with the specified key in this map
If the map previously contained a mapping for
the key, the old value is replaced by the specified value.
Namespace:
Hazelcast.Core
Assembly:
Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.9.4
SyntaxTValue Put(
TKey key,
TValue value
)
Function Put (
key As TKey,
value As TValue
) As TValue
TValue Put(
TKey key,
TValue value
)
abstract Put :
key : 'TKey *
value : 'TValue -> 'TValue
Parameters
- key
- Type: TKey
key - value
- Type: TValue
value
Return Value
Type:
TValue
previous value associated with
key
or
null
if there was no mapping for
key
.
Remarks
Associates the specified value with the specified key in this map
If the map previously contained a mapping for
the key, the old value is replaced by the specified value.
Warning:
This method returns a clone of previous value, not the original (identically equal) value
previously put into map.
Warning-2:
This method uses
GetHashCode and
Equals of binary form of
the
key, not the actual implementations of
GetHashCode and
Equals
defined in
key's class.
See Also