Tedd.HashSetExtensions 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Tedd.HashSetExtensions --version 1.0.1                
NuGet\Install-Package Tedd.HashSetExtensions -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tedd.HashSetExtensions" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Tedd.HashSetExtensions --version 1.0.1                
#r "nuget: Tedd.HashSetExtensions, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Tedd.HashSetExtensions as a Cake Addin
#addin nuget:?package=Tedd.HashSetExtensions&version=1.0.1

// Install Tedd.HashSetExtensions as a Cake Tool
#tool nuget:?package=Tedd.HashSetExtensions&version=1.0.1                

Tedd.HashSetExtensions

.Net extension methods for ToHashSet<T>()

Examples

ToHashSet(selector)

var list = new List<string>();
list.Add("A");
list.Add("B");
var hashSet = list.ToHashSet(s => s);
var thisIsTrue = hashSet.Contains("A");
var thisIsFalse = hashSet.Contains("C");

// Add B again
list.Add("B");
var hashSet2 = list.ToHashSet(s => s);
// HashSet only cointains 2 items because duplicates are ignored
var thisIsTwo = hashSet2.Count;

ToHashSet(selector, comparer)

var list = new List<string>();
list.Add("a");
list.Add("b");
var hashSet = list.ToHashSet(s => s, StringComparer.InvariantCultureIgnoreCase);
var thisIsTrue = hashSet.Contains("a");
var thisIsAlsoTrue = hashSet.Contains("A");

Contains(list)

var list = new List<string>();
list.Add("A");
list.Add("B");
list.Add("C");
var hashSet = list.ToHashSet(s => s);

var otherList = new List<string>();
otherList.Add("A");
otherList.Add("B");

var thisIsTrue = hashSet.Contains(otherList);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 is compatible.  netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 is compatible.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.0

    • No dependencies.
  • .NETCoreApp 2.1

    • No dependencies.
  • .NETCoreApp 3.0

    • No dependencies.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Tedd.HashSetExtensions:

Package Downloads
Tedd.DictionaryUtils

Extensions to Dictionary<TKey, TValue>

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 2,141 2/15/2020
1.0.1 1,050 2/14/2020
1.0.0 931 2/14/2020

Contains for array, list and ienumerable