Soenneker.Extensions.Enumerable 3.0.463

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Extensions.Enumerable --version 3.0.463
                    
NuGet\Install-Package Soenneker.Extensions.Enumerable -Version 3.0.463
                    
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="3.0.463" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Enumerable" Version="3.0.463" />
                    
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 3.0.463
                    
#r "nuget: Soenneker.Extensions.Enumerable, 3.0.463"
                    
#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@3.0.463
                    
#: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=3.0.463
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Enumerable&version=3.0.463
                    
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 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 net9.0 is compatible.  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.

NuGet packages (14)

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

Package Downloads
Soenneker.Utils.SingletonDictionary

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

Soenneker.Extensions.Enumerable.String

A collection of helpful enumerable string extension methods

Soenneker.Utils.String

A utility library for useful String operations

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.594 18,141 2/10/2026
4.0.593 92,808 1/14/2026
4.0.592 1,729 1/13/2026
4.0.591 22,049 1/12/2026
4.0.590 16,332 1/9/2026
4.0.589 8,867 1/8/2026
4.0.588 1,716 1/8/2026
4.0.587 103 1/8/2026
4.0.586 101 1/8/2026
4.0.585 205 1/8/2026
4.0.584 27,573 1/6/2026
4.0.583 29,207 1/3/2026
4.0.582 8,787 1/2/2026
4.0.581 711 1/2/2026
4.0.580 24,117 12/31/2025
4.0.579 19,082 12/21/2025
4.0.578 32,139 12/15/2025
4.0.577 14,624 12/12/2025
4.0.576 9,976 12/10/2025
3.0.463 3,474 2/25/2025
Loading failed