Created
May 8, 2024 12:45
-
-
Save sassdawe/722d34b80a97876069f8eb76fe83abd1 to your computer and use it in GitHub Desktop.
HashSet is a hash-based collection that allows only distinct elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
The basics: A HashSet is a collection that holds unique elements in no particular order (O(1) complexity | |
for adding, searching or removing). The HashSet<T> is a generic class in the System.Collections.Generic | |
namespace, ideal for managing large data sets and performing set operations. | |
Core aspects: The dotnet HashSet is a hash-based collection that allows only distinct elements. | |
It supports various operations such as Union, Intersection, Difference, and more. | |
More: https://www.bytehide.com/blog/hashset-csharp | |
#> | |
$mySet = New-Object System.Collections.Generic.HashSet[string] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment