System::Collections::Concurrent::ConcurrentDictionary::TryAdd طريقة

ConcurrentDictionary::TryAdd method

يحاول إضافة زوج المفتاح/القيمة إلى القاموس.

bool System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::TryAdd(const TKey &key, const TValue &value)
معاملنوعالوصف
المفتاحconst TKey&المفتاح للإضافة.
قيمةconst TValue&القيمة للإضافة.

ReturnValue

صحيح إذا تم إضافة زوج المفتاح/القيمة بنجاح، خطأ خلاف ذلك.

انظر أيضًا