SortedList(Of TKey, TValue).ICollection(Of KeyValuePair(Of TKey, TValue)).Remove Method (KeyValuePair(Of TKey, TValue))

 

Removes the first occurrence of a specific key/value pair from the ICollection(Of T).

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

Private Function Remove (
	keyValuePair As KeyValuePair(Of TKey, TValue)
) As Boolean
	Implements ICollection(Of KeyValuePair(Of TKey, TValue)).Remove

Return Value

Type: System.Boolean

true if keyValuePair was successfully removed from the ICollection(Of T); otherwise, false. This method also returns false if keyValuePair was not found in the original ICollection(Of T).

This method determines equality using the default comparer Default for KeyValuePair(Of TKey, TValue).

This method performs a binary search; however, the elements are moved up to fill in the open spot, so this method is an O(n) operation, where n is Count.

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