TryAdd(TKey, TValue)
Adds a new key-value pair.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
TryAdd(T, T)
public bool TryAdd(TKey key, TValue item)
Parameters
Returns
Type | Description |
|---|---|
| bool | True if the key-value pair was added. |
Remarks
If the key is already present, this method returns false without modifying the hash map.