## ConcurrentDictionary::TryAdd method


尝试向字典中添加键/值对。

```cpp
bool System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::TryAdd(const TKey &key, const TValue &value)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| 键 | const TKey\& | 要添加的键。 |
| 值 | const TValue\& | 要添加的值。 |

### ReturnValue

如果成功添加键/值对则为 true，否则为 false。

## 另见

* Class [ConcurrentDictionary](../)
* Namespace [System::Collections::Concurrent](../../)
* Library [Aspose.Font for C++](../../../)
