Wednesday, May 6, 2020

C# - How get Max() on FindAll() - LINQ

This example finds between MapAreas items max(Page) - but only in same Row as mapArea.Row.
int page = this.MapAreas.FindAll( area => area.Row == mapArea.Row ).Max( x => x.Page );