How to use linq to find the minimum
- by Danvil
I have a class A { public float Score; ... } and a List<A> items and would like to find the A which has minimal score.
Using items.Min(x => x.Score) gives the minimal score and not the instance with minimal score.
How can I get the instance with only iterating once through my Collection?