I just stumbled across this - a very useful extension LINQ library called MoreLinq.

The list of extensions that it provides includes some real gems:

  • MaxBy (or MinBy) - scan a sequence and return the item with the highest (or lowest) value as identified by a delegate.

This differs from Max (or Min) by returning the item from the sequence, not the value itself.

  • ForEach - this exists on List<T> but isn’t supplied by default.

  • Pipe - applies a delegate to each item of the sequence, without modifying the sequence

The project includes lots more - check out the MoreLinq project home page, the list of operators, or go straight to the download page.

Comments

blog comments powered by Disqus
Next Post
New Release of StyleCop Cmd  19 Sep 2010
Prior Post
Avoiding Null Checks  13 Sep 2010
Related Posts
Superpowers for your AI  29 Mar 2026
Autotitling Windows Terminal Tabs  17 Mar 2026
Don't assume shared understanding  25 Jan 2026
Better Table Tests in Go  21 Oct 2025
Error assertions  26 Apr 2025
Browsers and WSL  31 Mar 2024
Factory methods and functions  05 Mar 2023
Using Constructors  27 Feb 2023
An Inconvenient API  18 Feb 2023
Method Archetypes  11 Sep 2022
Archives
September 2010
2010