Wolfgang.Extensions.IEquatable

A lightweight .NET library of extension methods that simplify common equality comparison patterns — concise membership checks (IsInSet / IsNotInSet) and a fluent NotEqual complement to Equals.

Quick Start

using Wolfgang.Extensions.IEquatable;

// Membership check instead of a verbose OR chain
if (status.IsInSet("active", "pending", "approved"))
{
    // ...
}

// Inverse — instead of a verbose AND chain
if (role.IsNotInSet("admin", "moderator", "owner"))
{
    throw new UnauthorizedAccessException();
}

// Fluent inequality
if (currentVersion.NotEqual(supportedVersion))
{
    // ...
}

Where to next

Install

dotnet add package Wolfgang.Extensions.IEquatable

Targets .NET Framework 4.6.2, .NET Standard 2.0, .NET 8.0, and .NET 10.0.