Soenneker.Extensions.Enumerable 4.0.633

Prefix Reserved
dotnet add package Soenneker.Extensions.Enumerable --version 4.0.633
                    
NuGet\Install-Package Soenneker.Extensions.Enumerable -Version 4.0.633
                    
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="Soenneker.Extensions.Enumerable" Version="4.0.633" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Enumerable" Version="4.0.633" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.Enumerable" />
                    
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 Soenneker.Extensions.Enumerable --version 4.0.633
                    
#r "nuget: Soenneker.Extensions.Enumerable, 4.0.633"
                    
#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 Soenneker.Extensions.Enumerable@4.0.633
                    
#: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=Soenneker.Extensions.Enumerable&version=4.0.633
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Enumerable&version=4.0.633
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.Enumerable

A collection of helpful enumerable extension methods

Installation

dotnet add package Soenneker.Extensions.Enumerable

Usage

IEnumerable should have IsNullOrEmpty() too

var populatedList = new List<string>{"foo", "bar", "foo"};

populatedList.IsNullOrEmpty() // false

populatedList.Populated() // true
populatedList.None() // false

One call checking for null and contains any elements

List<string>? nullList = null;

nullList.IsNullOrEmpty() // true
nullList.Populated() // false

Duplicate handling

var containsDuplicates = populatedList.ContainsDuplicates(); // true

var deduped = populatedList.RemoveDuplicates(); // {"foo", "bar"}

Recursive flattening

public class Node 
{
    public string Name {get; set;}
    public List<Node> Children {get; set;}
}

void Example()
{
    var node = new Node(){ Name = "Node1" };
    node.Children = new List()
    {
        new Node() 
        {
            Name = "Node2"
        }
    }

    List<Node>? children = node.Children.ToFlattenedFromRecursive(c => c.Children);

    // Results in flattened List:
    // { Node1, Node2 }
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

NuGet packages (14)

Showing the top 5 NuGet packages that depend on Soenneker.Extensions.Enumerable:

Package Downloads
Soenneker.Extensions.Enumerable.String

A collection of helpful enumerable string extension methods

Soenneker.Utils.String

A utility library for useful String operations

Soenneker.Dictionaries.SingletonKeys

An externally initializing singleton dictionary that uses double-check asynchronous locking, with optional async and sync disposal

Soenneker.Swashbuckle.Authentication

A middleware implementing basic authentication and RBAC support for Swashbuckle (Swagger)

Soenneker.Utils.Network

A utility library of helpful network related operations

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.633 9,249 6/9/2026
4.0.632 50,885 6/5/2026
4.0.631 889 6/5/2026
4.0.629 314 6/5/2026
4.0.628 452 6/5/2026
4.0.627 109,191 5/12/2026
4.0.626 105,614 4/23/2026
4.0.625 2,041 4/22/2026
4.0.624 359 4/22/2026
4.0.623 568 4/21/2026
4.0.622 74,174 4/14/2026
4.0.621 120,182 3/13/2026
4.0.620 787 3/12/2026
4.0.619 151 3/12/2026
4.0.618 179 3/12/2026
4.0.615 333 3/12/2026
4.0.613 287 3/12/2026
4.0.612 614 3/12/2026
4.0.611 497 3/12/2026
4.0.610 158 3/12/2026
Loading failed

Update dependency Soenneker.Utils.Random to 4.0.122 (#693)