You can use linq as follows:
var max = s.Select(o => o.Price).Max();
var max = s.Max(o => o.Price);
For this to work, it pricemust be publicavailable.
You can also get the seller with the highest price, for example:
var maxPriceSeller = s.OrderByDescending(o => o.Price).First();
( priceis a property for the field price)
source
share