DataCollection<TKey,TValue>.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Add(KeyValuePair<TKey,TValue>) |
Adds the specified key and value to the dictionary. |
Add(TKey, TValue) |
Adds the specified key and value to the dictionary. |
Add(KeyValuePair<TKey,TValue>)
Adds the specified key and value to the dictionary.
public:
void Add(System::Collections::Generic::KeyValuePair<TKey, TValue> item);
public void Add (System.Collections.Generic.KeyValuePair<TKey,TValue> item);
member this.Add : System.Collections.Generic.KeyValuePair<'Key, 'Value> -> unit
Public Sub Add (item As KeyValuePair(Of TKey, TValue))
Parameters
- item
- KeyValuePair<TKey,TValue>
The key and value to add.
Applies to
Add(TKey, TValue)
Adds the specified key and value to the dictionary.
public:
void Add(TKey key, TValue value);
public void Add (TKey key, TValue value);
member this.Add : 'Key * 'Value -> unit
Public Sub Add (key As TKey, value As TValue)
Parameters
- key
- TKey
The key of the element to add.
- value
- TValue
The value of the element to add.