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

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

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Removes the first occurrence of the specified element from the ICollection(Of T).

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

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

Parameters

keyValuePair
Type: System.Collections.Generic.KeyValuePair(Of TKey, TValue)
The KeyValuePair(Of TKey, TValue) structure to remove from the ICollection(Of T).

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 ICollection(Of T).

Implements

ICollection(Of T).Remove(T)

This method determines equality by first using the Comparer property for the key and then using EqualityComparer(Of T).Default for the value.

This method is an O(log n) operation.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft