Get the maximum value out of an complex class
- by iTayb
I have the following class:
class Seller
{
private string sellerName;
private decimal price;
}
~propreties for SellerName and Price goes here~
I also have a list of sellers:
list<Seller> s = new list<Seller>();
How can I get the maximum value of price out of all the sellers?
Thank you very much.