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

ConcurrentDictionary::TryAdd method

Försöker lägga till nyckel/värde-par i ordboken.

bool System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::TryAdd(const TKey &key, const TValue &value)
ParameterTypeBeskrivning
nyckelconst TKey&Nyckel att lägga till.
valueconst TValue&Värde att lägga till.

ReturnValue

Sant om nyckel/värde‑paret lades till framgångsrikt, annars falskt.

Se även