Soenneker.Extensions.Enumerable 3.0.311

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.311                
NuGet\Install-Package Soenneker.Extensions.Enumerable -Version 3.0.311                
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.311" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Extensions.Enumerable --version 3.0.311                
#r "nuget: Soenneker.Extensions.Enumerable, 3.0.311"                
#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.
// Install Soenneker.Extensions.Enumerable as a Cake Addin
#addin nuget:?package=Soenneker.Extensions.Enumerable&version=3.0.311

// Install Soenneker.Extensions.Enumerable as a Cake Tool
#tool nuget:?package=Soenneker.Extensions.Enumerable&version=3.0.311                

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

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.Utils.Process

A utility library implementing useful process operations

Soenneker.Swashbuckle.Authentication

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.323 502 1/3/2025
3.0.322 382 1/3/2025
3.0.321 525 1/3/2025
3.0.320 157 1/3/2025
3.0.319 528 1/3/2025
3.0.318 1,260 1/2/2025
3.0.317 36 1/2/2025
3.0.316 926 1/2/2025
3.0.315 42 1/2/2025
3.0.314 1,121 1/2/2025
3.0.313 41 1/2/2025
3.0.312 4,411 1/1/2025
3.0.311 38 1/1/2025
3.0.310 73 12/31/2024
3.0.309 45 12/31/2024
3.0.308 1,694 12/31/2024
3.0.307 40 12/31/2024
3.0.306 114 12/31/2024
3.0.305 426 12/31/2024
3.0.304 42 12/31/2024
3.0.303 677 12/31/2024
3.0.302 185 12/31/2024
3.0.301 3,981 12/31/2024
3.0.300 3,041 12/31/2024
3.0.299 691 12/31/2024
3.0.298 2,405 12/31/2024
3.0.297 1,945 12/31/2024
3.0.296 53 12/31/2024
3.0.295 58 12/31/2024
3.0.294 9,649 12/28/2024
3.0.293 1,917 12/28/2024
3.0.292 1,079 12/28/2024
3.0.291 1,305 12/27/2024
3.0.290 8,433 12/24/2024
3.0.289 1,802 12/24/2024
3.0.288 1,754 12/24/2024
3.0.287 2,479 12/24/2024
3.0.286 2,657 12/24/2024
3.0.285 2,094 12/24/2024
3.0.284 1,722 12/24/2024
3.0.283 1,359 12/23/2024
3.0.282 2,902 12/23/2024
3.0.281 3,338 12/23/2024
3.0.280 1,297 12/23/2024
3.0.279 3,750 12/23/2024
3.0.278 263 12/23/2024
3.0.277 3,573 12/22/2024
3.0.276 5,704 12/22/2024
3.0.275 5,715 12/22/2024
3.0.274 7,752 12/21/2024
3.0.273 415 12/21/2024
3.0.272 3,789 12/21/2024
3.0.271 4,912 12/21/2024
3.0.270 1,035 12/21/2024
3.0.269 5,885 12/20/2024
3.0.268 11,533 12/18/2024
3.0.267 123 12/18/2024
3.0.266 7,518 12/17/2024
3.0.265 6,095 12/17/2024
3.0.264 341 12/16/2024
3.0.263 1,071 12/16/2024
3.0.262 8,111 12/10/2024
3.0.261 2,231 12/9/2024
3.0.260 3,667 12/9/2024
3.0.259 2,484 12/9/2024
3.0.258 6,980 12/6/2024
3.0.257 1,298 12/6/2024
3.0.256 2,273 12/6/2024
3.0.255 7,097 12/6/2024
3.0.254 175 12/6/2024
3.0.253 314 12/6/2024
3.0.252 975 12/6/2024
3.0.251 5,630 12/6/2024
3.0.250 102 12/6/2024
3.0.249 97 12/6/2024
3.0.248 4,449 12/5/2024
3.0.247 4,428 12/5/2024
3.0.246 3,407 12/5/2024
3.0.245 4,064 12/5/2024
3.0.244 571 12/5/2024
3.0.243 494 12/5/2024
3.0.242 5,156 12/4/2024
3.0.241 459 12/4/2024
3.0.240 1,108 12/4/2024
3.0.239 3,583 12/4/2024
3.0.238 3,770 12/3/2024
3.0.237 2,828 12/3/2024
3.0.236 3,574 12/3/2024
3.0.235 3,396 12/3/2024
3.0.234 4,690 12/2/2024
3.0.233 3,857 12/2/2024
3.0.232 2,361 12/2/2024
3.0.231 414 12/2/2024
3.0.230 4,277 12/1/2024
3.0.229 595 12/1/2024
3.0.228 3,124 12/1/2024
3.0.227 4,068 12/1/2024
3.0.226 4,277 11/29/2024
3.0.225 6,194 11/21/2024
3.0.224 6,169 11/20/2024
3.0.223 651 11/20/2024
3.0.222 1,132 11/20/2024
3.0.221 554 11/19/2024
3.0.220 5,652 11/19/2024
3.0.219 2,304 11/19/2024
3.0.218 81 11/19/2024
3.0.217 3,809 11/19/2024
3.0.216 71 11/19/2024
3.0.215 10,559 11/14/2024
3.0.214 1,152 11/14/2024
3.0.213 4,076 11/14/2024
3.0.212 960 11/14/2024
3.0.211 557 11/14/2024
3.0.210 4,313 11/14/2024
3.0.209 89 11/14/2024
3.0.208 3,424 11/14/2024
3.0.207 180 11/14/2024
2.1.206 11,631 11/13/2024
2.1.205 4,891 11/13/2024
2.1.204 12,090 11/9/2024
2.1.203 835 11/9/2024
2.1.202 2,146 11/9/2024
2.1.201 1,261 11/8/2024
2.1.200 1,052 11/8/2024
2.1.199 86 11/8/2024
2.1.198 1,887 11/8/2024
2.1.197 239 11/8/2024
2.1.196 4,606 11/8/2024
2.1.195 6,009 11/8/2024
2.1.194 13,197 11/1/2024
2.1.192 9,606 10/29/2024
2.1.191 10,352 10/28/2024
2.1.190 6,576 10/26/2024
2.1.189 9,410 10/22/2024
2.1.188 1,469 10/22/2024
2.1.187 1,045 10/22/2024
2.1.186 8,508 10/17/2024
2.1.185 6,187 10/15/2024
2.1.184 2,349 10/14/2024
2.1.183 6,854 10/11/2024
2.1.182 932 10/11/2024
2.1.181 546 10/11/2024
2.1.180 10,942 10/9/2024
2.1.179 900 10/8/2024
2.1.178 5,502 10/8/2024
2.1.177 834 10/8/2024
2.1.176 12,094 10/3/2024
2.1.175 3,709 10/3/2024
2.1.174 8,977 10/2/2024
2.1.173 2,700 10/2/2024
2.1.172 6,641 10/1/2024
2.1.171 1,773 10/1/2024
2.1.170 2,722 10/1/2024
2.1.169 7,606 9/29/2024
2.1.168 2,204 9/29/2024
2.1.167 1,607 9/29/2024
2.1.166 9,233 9/27/2024
2.1.165 5,260 9/27/2024
2.1.164 81 9/27/2024
2.1.163 281 9/27/2024
2.1.162 82 9/27/2024
2.1.161 7,899 9/26/2024
2.1.160 7,534 9/26/2024
2.1.159 6,927 9/26/2024
2.1.158 7,071 9/23/2024
2.1.157 3,272 9/23/2024
2.1.156 1,913 9/23/2024
2.1.155 2,010 9/23/2024
2.1.154 6,511 9/23/2024
2.1.153 714 9/23/2024
2.1.152 869 9/23/2024
2.1.151 76 9/23/2024
2.1.150 2,345 9/23/2024
2.1.149 11,788 9/17/2024
2.1.148 87 9/17/2024
2.1.147 406 9/17/2024
2.1.146 4,810 9/17/2024
2.1.145 4,159 9/17/2024
2.1.144 5,444 9/17/2024
2.1.143 94 9/17/2024
2.1.142 510 9/17/2024
2.1.141 1,209 9/17/2024
2.1.140 13,343 9/16/2024
2.1.139 7,494 9/12/2024
2.1.138 5,114 9/11/2024
2.1.137 3,067 9/11/2024
2.1.136 5,966 9/11/2024
2.1.135 4,878 9/11/2024
2.1.134 11,157 9/10/2024
2.1.133 2,336 9/10/2024
2.1.132 3,727 9/9/2024
2.1.131 4,093 9/9/2024
2.1.130 2,599 9/9/2024
2.1.129 1,233 9/9/2024
2.1.128 88 9/9/2024
2.1.127 99 9/9/2024
2.1.126 85 9/9/2024
2.1.125 16,783 9/6/2024
2.1.124 6,526 9/6/2024
2.1.123 3,365 9/5/2024
2.1.122 2,028 9/5/2024
2.1.121 4,107 9/5/2024
2.1.120 2,210 9/5/2024
2.1.119 84 9/5/2024
2.1.118 1,622 9/5/2024
2.1.117 5,884 9/5/2024
2.1.116 1,397 9/4/2024
2.1.115 12,058 9/3/2024
2.1.114 1,181 9/3/2024
2.1.113 4,923 9/3/2024
2.1.112 9,524 8/29/2024
2.1.111 6,714 8/26/2024
2.1.110 6,689 8/21/2024
2.1.109 3,811 8/21/2024
2.1.108 429 8/20/2024
2.1.107 4,723 8/20/2024
2.1.106 96 8/20/2024
2.1.105 4,794 8/20/2024
2.1.104 2,906 8/20/2024
2.1.103 9,046 8/15/2024
2.1.102 8,172 8/13/2024
2.1.101 7,817 8/6/2024
2.1.100 9,160 8/1/2024
2.1.99 549 8/1/2024
2.1.98 8,664 7/25/2024
2.1.97 1,049 7/25/2024
2.1.96 971 7/25/2024
2.1.95 628 7/24/2024
2.1.94 201 7/24/2024
2.1.93 9,101 7/20/2024
2.1.92 8,181 7/14/2024
2.1.91 2,225 7/14/2024
2.1.90 6,784 7/10/2024
2.1.89 216 7/10/2024
2.1.88 2,145 7/10/2024
2.1.87 2,035 7/10/2024
2.1.86 209 7/10/2024
2.1.85 207 7/10/2024
2.1.83 2,109 7/10/2024
2.1.82 3,213 7/9/2024
2.1.80 825 7/9/2024
2.1.79 1,246 7/9/2024
2.1.78 7,683 7/9/2024
2.1.77 3,040 7/9/2024
2.1.76 7,666 7/9/2024
2.1.75 105 7/9/2024
2.1.74 120 7/8/2024
2.1.73 102 7/8/2024
2.1.72 2,501 7/8/2024
2.1.71 89 7/8/2024
2.1.70 6,916 7/8/2024
2.1.69 2,262 7/7/2024
2.1.68 2,571 7/7/2024
2.1.67 665 7/7/2024
2.1.66 1,301 7/7/2024
2.1.65 3,018 7/7/2024
2.1.64 2,686 7/7/2024
2.1.63 101 7/7/2024
2.1.62 3,589 7/5/2024
2.1.61 72,777 5/25/2024
2.1.60 102 5/25/2024
2.1.59 517 5/25/2024
2.1.58 13,939 5/22/2024
2.1.57 106 5/22/2024
2.1.56 11,439 5/17/2024
2.1.55 15,862 4/30/2024
2.1.54 15,797 4/28/2024
2.1.53 107 4/28/2024
2.1.52 666 4/27/2024
2.1.51 97 4/27/2024
2.1.50 24,954 4/12/2024
2.1.49 1,341 4/12/2024
2.1.48 113 4/12/2024
2.1.47 37,211 3/18/2024
2.1.46 8,727 3/13/2024
2.1.45 2,264 3/13/2024
2.1.44 60,909 2/21/2024
2.1.43 2,721 2/21/2024
2.1.42 106 2/21/2024
2.1.41 21,704 2/16/2024
2.1.40 629 2/16/2024
2.1.39 23,774 2/9/2024
2.1.38 18,825 2/6/2024
2.1.37 115 2/6/2024
2.1.36 62,547 1/15/2024
2.1.35 819 1/15/2024
2.1.34 26,043 1/5/2024
2.1.33 2,434 1/5/2024
2.1.32 13,321 12/27/2023
2.1.31 1,322 12/27/2023
2.1.30 1,081 12/27/2023
2.1.29 7,811 12/25/2023
2.1.28 1,366 12/25/2023
2.1.27 676 12/25/2023
2.1.26 10,479 12/23/2023
2.1.25 127 12/23/2023
2.1.24 805 12/23/2023
2.1.23 20,583 12/9/2023
2.1.22 1,333 12/9/2023
2.1.21 244 12/9/2023
2.1.20 1,905 12/9/2023
2.1.19 10,779 12/4/2023
2.1.18 818 12/4/2023
2.1.17 5,422 11/26/2023
2.1.16 5,385 11/23/2023
2.1.15 335 11/23/2023
2.1.14 944 11/23/2023
2.1.13 9,378 11/19/2023
2.1.12 134 11/19/2023
2.1.11 1,191 11/18/2023
2.1.10 3,394 11/18/2023
2.1.9 1,938 11/18/2023
2.1.8 3,654 11/17/2023
2.1.7 1,068 11/17/2023
2.1.6 1,694 11/17/2023
2.1.5 872 11/17/2023
2.1.4 636 11/16/2023
2.1.3 180 11/16/2023
2.0.52 1,245 11/15/2023
2.0.51 2,125 11/15/2023
2.0.2 131 11/16/2023
2.0.1 137 11/16/2023
1.0.50 4,107 11/11/2023
1.0.49 119 11/11/2023
1.0.48 104 11/11/2023
1.0.47 1,335 11/9/2023
1.0.46 125 11/9/2023
1.0.45 5,184 11/6/2023
1.0.44 2,228 11/3/2023
1.0.43 1,812 11/2/2023
1.0.42 1,876 11/1/2023
1.0.41 7,482 10/18/2023
1.0.40 2,999 10/17/2023
1.0.39 1,238 10/16/2023
1.0.38 2,656 10/13/2023
1.0.37 149 10/13/2023
1.0.36 6,145 9/19/2023
1.0.35 2,034 9/18/2023
1.0.34 128 9/18/2023
1.0.33 7,662 8/30/2023
1.0.32 2,664 8/29/2023
1.0.31 4,149 8/24/2023
1.0.30 140 8/24/2023
1.0.29 4,329 8/17/2023
1.0.28 162 8/17/2023
1.0.27 8,019 8/7/2023
1.0.26 163 8/7/2023
1.0.25 7,966 7/10/2023
1.0.24 10,303 7/7/2023
1.0.23 159 7/7/2023
1.0.22 9,291 6/28/2023
1.0.21 44,278 5/24/2023
1.0.20 1,124 5/24/2023
1.0.19 400 5/23/2023
1.0.18 183 5/31/2023
1.0.17 2,741 5/23/2023
1.0.16 2,932 5/22/2023
1.0.15 5,952 5/17/2023
1.0.14 171 5/17/2023
1.0.13 5,578 4/28/2023
1.0.12 2,204 4/24/2023
1.0.11 957 4/21/2023
1.0.10 4,476 4/12/2023
1.0.9 1,061 4/11/2023
1.0.8 2,020 4/3/2023
1.0.7 225 4/3/2023
1.0.6 358 4/1/2023
1.0.5 2,001 3/23/2023
1.0.3 537 2/28/2023
1.0.2 442 2/16/2023