Compares the existing value for the specified key with a specified value,
and if they are equal, updates the key with a third value.
Namespace: Soss.Client.Concurrent
Assembly: soss_namedcache (in soss_namedcache.dll) Version: 6.2.0.0
Syntax
Parameters
- key
- Type: TKey
The key whose value is compared with comparisonValue and possibly replaced. - newValue
- Type: TValue
The value that replaces the value of the element with key if the comparison results in equality. - comparisonValue
- Type: TValue
The value that is compared to the value of the element with key.
Return Value
Type: Booleantrue if the value with key was equal to comparisonValue and replaced with newValue, otherwise it returns false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown if key is a null reference. |
TimeoutException | Thrown when the maximum number of internal retries reached. |
See Also