Find max value of two (or more) properties in list
问题 This question has been asked in one or the other way on SO but not like this. I just came over a very basic issue where I was looking for a statisfying solution :-) I got a list of objects which have two integer properties. Now I want to find the max value of both properties of all object in the list. I came up with three solutions: First approach: int max = Math.Max(list.Max(elem => elem.Nr), list.Max(elem => elem.OtherNr)); Second approach: public int Max(List<Thing> list) { int maxNr = 0;