CollectionExtensions.IfPresentRemoveLocked Method

This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.Utility.Extensions
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)

Usage

'Usage
Dim list As HashSet(Of T)
Dim element As T
Dim returnValue As Boolean

returnValue = CollectionExtensions.IfPresentRemoveLocked(list, element)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function IfPresentRemoveLocked(Of T) ( _
    list As HashSet(Of T), _
    element As T _
) As Boolean
[ExtensionAttribute] 
public static bool IfPresentRemoveLocked<T> (
    HashSet<T> list,
    T element
)
[ExtensionAttribute] 
public:
generic<typename T>
static bool IfPresentRemoveLocked (
    HashSet<T>^ list, 
    T element
)

GenericParameters

  • T

Parameters

  • list
  • element

Return Value

Returns Boolean.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

CollectionExtensions Class
CollectionExtensions Members
Microsoft.OneGet.Utility.Extensions Namespace