RemoveWhere Method

SortedSet(Of T).RemoveWhere Method

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

Removes all elements that match the conditions defined by the specified predicate from a SortedSet(Of T).

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

'Declaration
Public Function RemoveWhere ( _
	match As Predicate(Of T) _
) As Integer

Parameters

match
Type: System.Predicate(Of T)
The delegate that defines the conditions of the elements to remove.

Return Value

Type: System.Int32
The number of elements that were removed from the SortedSet(Of T) collection..

ExceptionCondition
ArgumentNullException

match is Nothing.

match must not modify the SortedSet(Of T). Doing so can cause unexpected results.

Calling this method is an O(n) operation, where n is Count.

The following example removes unwanted elements from a sorted set. This code example is part of a larger example provided for the SortedSet(Of T) class.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft