次の方法で共有


HashSet<T>.RemoveWhere Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
Public Function RemoveWhere ( _
    match As Predicate(Of T) _
) As Integer
public int RemoveWhere(
    Predicate<T> match
)

Parameters

Return Value

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

Exceptions

Exception Condition
ArgumentNullException

match is nulla null reference (Nothing in Visual Basic).

Remarks

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

Version Information

Silverlight

Supported in: 5, 4

Platforms

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