Skip to main content
EqCmp package icon

EqCmp

v1.0.0-beta5Latest Pre-release
net8.0

A small C# library for constructing instances of `IEqualityComparer<T>` using a succinct API

Published
May 7, 2026
5mo ago
Total Downloads
727
727

Install

dotnet add package EqCmp --version 1.0.0-beta5
ProductVersions
.NET
net8.0

README

EqCmp

A small C# library for constructing instances of IEqualityComparer<T> using a succinct API

EqCmp Nuget

Usage

var comparer = EqCmp<Foo>.Create(x => (x.Bar, x.Baz));

var foo1 = new Foo { Bar = 1, Baz = "a" };
var foo2 = new Foo { Bar = 1, Baz = "a" };
var foo3 = new Foo { Bar = 2, Baz = "b" };

var set = new HashSet<Foo>(comparer);
set.Add(foo1);
set.Add(foo2);
set.Add(foo3);

Console.WriteLine(set.Count); // 2

class Foo
{
    public int Bar { get; set; }
    public string Baz { get; set; }
}

Changes from Previous Version

No structural changes between v1.0.0-beta4 and v1.0.0-beta5.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.