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
Place a nullable cast INSIDE the expression to ensure that a blank list will cast as a null. You can then add defaults.
double max = pointList.Max(p=>(double?)p.X) ?? 0;