OrderedDictionaryTKey, TValueAdd Method |
Namespace: Ifs.Fnd.Core
public int Add( TKey key, TValue value )
Exception | Condition |
---|---|
ArgumentNullException | key is |
ArgumentException | An element with the same key already exists in the OrderedDictionary<TKey,TValue> |
You can also use the Item property to add new elements by setting the value of a key that does not exist in the OrderedDictionary<TKey,TValue> collection; however, if the specified key already exists in the OrderedDictionary<TKey,TValue>, setting the Item property overwrites the old value. In contrast, the [M:Add] method does not modify existing elements.