Get the maximum value out of an complex class
        Posted  
        
            by iTayb
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by iTayb
        
        
        
        Published on 2010-04-06T23:23:42Z
        Indexed on 
            2010/04/06
            23:33 UTC
        
        
        Read the original article
        Hit count: 229
        
c#
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.
© Stack Overflow or respective owner