public bool TryAdd(
TKey key,
TValue value
)Public Function TryAdd (
key As TKey,
value As TValue
) As Booleanpublic:
bool TryAdd(
TKey key,
TValue value
)member TryAdd :
key : 'TKey *
value : 'TValue -> bool Unlike the Add method, this method doesn't throw an exception if the element with the given key exists in the LockingDictionaryTKey, TValue. Unlike the indexer, TryAdd doesn't override the element if the element with the given key exists in the dictionary. If the key already exists, TryAdd does nothing and returns .