Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SortedList<TKey, TValue>::ICollection<KeyValuePair<TKey, TValue>>::Add Method (KeyValuePair<TKey, TValue>)

 

Adds a key/value pair to the ICollection<T>.

Namespace:   System.Collections.Generic
Assembly:  System (in System.dll)

private:
virtual void Add(
	KeyValuePair<TKey, TValue> keyValuePair
) sealed = ICollection<KeyValuePair<TKey, TValue>>::Add

This method is an O(n) operation for unsorted data, where n is Count. It is an O(log n) operation if the new element is added at the end of the list. If insertion causes a resize, the operation is O(n).

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft