System::Collections::Concurrent::ConcurrentDictionary::TryAdd metodo

ConcurrentDictionary::TryAdd method

Prova ad aggiungere una coppia chiave/valore al dizionario.

bool System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::TryAdd(const TKey &key, const TValue &value)
ParametroTipoDescrizione
chiaveconst TKey&Chiave da aggiungere.
valueconst TValue&Valore da aggiungere.

ReturnValue

True se la coppia chiave/valore è stata aggiunta con successo, false altrimenti.

Vedi anche