CapitalSix.Linq.Extensions 1.0.0

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

// Install CapitalSix.Linq.Extensions as a Cake Tool
#tool nuget:?package=CapitalSix.Linq.Extensions&version=1.0.0

Linq Extensions

A collection of reusable Linq extensions.

Chunk extensions

var list = new List<int>();
for (var i = 0; i < 21000; i++) list.Add(i);

var chunks = list.Chunks(1800);

chunks contains a list of 12 lists, which are each 1800 elements except for the last, which contains the 1200 remaining elements.

Group extensions

This extension groups elements based on a key definition and on a equality comparer.

var list = new List<string>()
{
    "Monkey",
    "Disco",
    "monkey",
    "banana",
    " Monkey",
    "Banana",
    "tree"
};
var grouped = list.Group(new CaseInsensitiveComparer());

Suppose that the CaseInsensitiveComparere compares on trimmed and lowercase values, than this results in a dictionary with 4 pairs:

  • "Monkey": { "Monkey", "monkey", " Monkey" },
  • "Disco": { "Disco" },
  • "banana": { "banana", "Banana" },
  • "tree": { "tree" }

Duplicate extensions

This extension finds duplicates in a list an collects all duplicates in a dictionary.

var list = new List<string>()
{
    "Monkey",
    "Disco",
    "monkey",
    "banana",
    " Monkey",
    "Banana",
    "tree"
};
var grouped = list.Group(new CaseInsensitiveComparer());

Suppose that the CaseInsensitiveComparere compares on trimmed and lowercase values, than this results in a dictionary with 2 pairs:

  • "Monkey": { "Monkey", "monkey", " Monkey" },
  • "banana": { "banana", "Banana" }
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 197 6/13/2022