Have a look at MinBy
in MoreLINQ - or I believe Reactive Extensions has something similar in System.Interactive
:
var cheapestProduct = products.MinBy(p => p.Price);
If more than one item has the lowest value, the earliest one in the sequence will be returned.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…