OrderedDictionaryTKey, TValueTryAdd Method
Tries to add the specified key and value to the dictionary as an O(1) operation.
Namespace: Gemstone.CollectionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public bool TryAdd(
TKey key,
TValue value
)
Public Function TryAdd (
key As TKey,
value As TValue
) As Boolean
public:
bool TryAdd(
TKey key,
TValue value
)
function TryAdd(key, value);
- key TKey
- The key of the element to add.
- value TValue
- The value of the element to add. The value can be null for reference types.
Booleantrue if the element was added to the
OrderedDictionaryTKey, TValue; false if the
OrderedDictionaryTKey, TValue already contained an element with the specified key.
ArgumentNullException | key is null. |