Method Update
Update(K, V)
Look for a specific key in the dictionary and if found replace the value with a new one. This can be seen as a non-adding version of "this[key] = val".
Declaration
bool Update(K key, V val)
Parameters
Type | Name | Description |
---|---|---|
K | key | The key to look for |
V | val | The new value |
Returns
Type | Description |
---|---|
System.Boolean | True if key was found |
Update(K, V, out V)
Look for a specific key in the dictionary and if found replace the value with a new one. This can be seen as a non-adding version of "this[key] = val" reporting the old value.
Declaration
bool Update(K key, V val, out V oldval)
Parameters
Type | Name | Description |
---|---|---|
K | key | The key to look for |
V | val | The new value |
V | oldval | The old value if any |
Returns
Type | Description |
---|---|
System.Boolean | True if key was found |