System::Collections::Concurrent::ConcurrentDictionary::TryAdd-Methode

ConcurrentDictionary::TryAdd method

Versucht, ein Schlüssel/Wert-Paar zum Wörterbuch hinzuzufügen.

bool System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::TryAdd(const TKey &key, const TValue &value)
ParameterTypBeschreibung
Schlüsselconst TKey&Schlüssel zum Hinzufügen.
Wertconst TValue&Wert zum Hinzufügen.

ReturnValue

True, wenn das Schlüssel/Wert‑Paar erfolgreich hinzugefügt wurde, sonst false.

Siehe auch