SamHowes.Extensions.Collections 0.0.12

There is a newer version of this package available.
See the version list below for details.
dotnet add package SamHowes.Extensions.Collections --version 0.0.12
                    
NuGet\Install-Package SamHowes.Extensions.Collections -Version 0.0.12
                    
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="SamHowes.Extensions.Collections" Version="0.0.12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SamHowes.Extensions.Collections" Version="0.0.12" />
                    
Directory.Packages.props
<PackageReference Include="SamHowes.Extensions.Collections" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SamHowes.Extensions.Collections --version 0.0.12
                    
#r "nuget: SamHowes.Extensions.Collections, 0.0.12"
                    
#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.
#:package SamHowes.Extensions.Collections@0.0.12
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SamHowes.Extensions.Collections&version=0.0.12
                    
Install as a Cake Addin
#tool nuget:?package=SamHowes.Extensions.Collections&version=0.0.12
                    
Install as a Cake Tool

Commonly used collections

I got tired of rewriting this code

Heap<T>

Simple implementation of a priority heap

MaxHeap

public record Item(int Value);

var heap = new MaxHeap<Item>((a,b) => a.Value - b.Value);

heap.Push(new Item(5));
heap.Push(new Item(10));
heap.Push(new Item(1));

heap.Pop() // 10
heap.Pop() // 5
heap.Pop() // 1

MinHeap

public record Item(int Value);

var heap = new MinHeap<Item>((a,b) => a.Value - b.Value);

heap.Push(new Item(5));
heap.Push(new Item(10));
heap.Push(new Item(1));

heap.Pop() // 1
heap.Pop() // 5
heap.Pop() // 10
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SamHowes.Extensions.Collections:

Package Downloads
SamHowes.Extensions.DependencyInjection.Modules

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.3 310 5/22/2025
0.1.2 273 4/13/2025
0.1.1 231 4/7/2025
0.1.0 224 4/7/2025
0.0.17 670 3/24/2025
0.0.16 472 3/24/2025
0.0.15 165 3/2/2025
0.0.14 165 3/2/2025
0.0.13 162 3/2/2025
0.0.12 153 3/2/2025
0.0.11 156 3/2/2025
0.0.10 175 2/5/2025
0.0.9 241 8/18/2024
0.0.8 203 8/18/2024
0.0.7 197 8/18/2024
0.0.6 199 8/17/2024
0.0.5 196 8/17/2024
0.0.4 194 8/17/2024
0.0.3 197 8/17/2024
0.0.2 201 8/17/2024
Loading failed