HashSet<T>.Remove Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Removes the specified element from a HashSet<T> object.
Assembly: System.Core (in System.Core.dll)
Parameters
- item
- Type: T
The element to remove.
Return Value
Type: System.Booleantrue if the element is successfully found and removed; otherwise, false. This method returns false if item is not found in the HashSet<T> object.
Implements
ICollection<T>.Remove(T)If the HashSet<T> object does not contain the specified element, the object remains unchanged. No exception is thrown.
This method is an O(1) operation.
Show: