Soenneker.Extensions.Enumerable
3.0.267
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Soenneker.Extensions.Enumerable --version 3.0.267
NuGet\Install-Package Soenneker.Extensions.Enumerable -Version 3.0.267
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.267" />
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.267" />
<PackageReference Include="Soenneker.Extensions.Enumerable" />
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.267
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Extensions.Enumerable, 3.0.267"
#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.267
#: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.267
#tool nuget:?package=Soenneker.Extensions.Enumerable&version=3.0.267
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.
-
net9.0
- Soenneker.Extensions.Task (>= 3.0.70)
- Soenneker.Utils.Random (>= 3.0.53)
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,912 | 2/10/2026 |
| 4.0.593 | 92,829 | 1/14/2026 |
| 4.0.592 | 1,729 | 1/13/2026 |
| 4.0.591 | 22,049 | 1/12/2026 |
| 4.0.590 | 16,333 | 1/9/2026 |
| 4.0.589 | 8,867 | 1/8/2026 |
| 4.0.588 | 1,717 | 1/8/2026 |
| 4.0.587 | 103 | 1/8/2026 |
| 4.0.586 | 102 | 1/8/2026 |
| 4.0.585 | 206 | 1/8/2026 |
| 4.0.584 | 27,581 | 1/6/2026 |
| 4.0.583 | 29,207 | 1/3/2026 |
| 4.0.582 | 8,788 | 1/2/2026 |
| 4.0.581 | 712 | 1/2/2026 |
| 4.0.580 | 24,118 | 12/31/2025 |
| 4.0.579 | 19,085 | 12/21/2025 |
| 4.0.578 | 32,139 | 12/15/2025 |
| 4.0.577 | 14,624 | 12/12/2025 |
| 4.0.576 | 9,977 | 12/10/2025 |
| 3.0.267 | 305 | 12/18/2024 |
Loading failed