.NET 6 has new MaxBy extension method for finding max value of a property in a collection

MaxBy is a nice LINQ extension which was released as part of .NET 6 in November 2021. It allows us to find the item with the max value for a particular property in a collection.

Simple example below…

Leave a Reply

Your email address will not be published.