Export (0) Print
Expand All

HashSet<T>.RemoveWhere Method

Removes all elements that match the conditions defined by the specified predicate from a HashSet<T> collection.

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

public int RemoveWhere(
	Predicate<T> match
)

Parameters

match
Type: System.Predicate<T>
The Predicate<T> delegate that defines the conditions of the elements to remove.

Return Value

Type: System.Int32
The number of elements that were removed from the HashSet<T> collection.

ExceptionCondition
ArgumentNullException

match is null.

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

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft