System::Collections::Concurrent::ConcurrentDictionary::TryAdd method
ConcurrentDictionary::TryAdd method
尝试向字典中添加键/值对。
bool System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::TryAdd(const TKey &key, const TValue &value)
| Parameter | Type | 描述 |
|---|---|---|
| 键 | const TKey& | 要添加的键。 |
| value | const TValue& | 要添加的值。 |
ReturnValue
如果键/值对成功添加则为 True,否则为 false。
另见
- Class ConcurrentDictionary
- Namespace System::Collections::Concurrent
- Library Aspose.Page for C++