This will be one of the ways (although not optimal):
List<Point> list = ...; Point maxPoint = list.OrderByDescending(p => pX + pY).First();
Another way that should work much better would be to modify your Point class to implement IComparable<T> , for example:
class Point : IComparable<Point> { double X, Y; public int CompareTo(Point other) { return (X + Y).CompareTo(other.X + other.Y); } }
... which then allows you to simply:
List<Point> list = ...; Point maxPoint = list.Max();
source share