I have a list that contains a bunch of Points (with an X and Y component).
I want to get the Max X for all points in the list, like this:
double max
If you want to provide a default value for X of a null point:
pointList.Max(p => p == null ? 0 : p.X)
Or to provide a default for an empty list:
int max = points.Where(p => p != null) .Select(p => p.X) .DefaultIfEmpty() .Max();