System::Collections::Concurrent::ConcurrentDictionary::TryAdd method

ConcurrentDictionary::TryAdd method

Tries to add key/value pair into the dictionary.

bool System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::TryAdd(const TKey &key, const TValue &value)
ParameterTypeDescription
keyconst TKey&Key to add.
valueconst TValue&Value to add.

ReturnValue

True if key/value pair was added sucessfully, false otherwise.

See Also