示例#1
0
        static void FindRicher(List <People> pp)
        {
            People richMan = pp.OrderByDescending(n => n.Balance).FirstOrDefault();

            Console.WriteLine("Самый богатый: " + richMan.Name + " - " + richMan.Balance);
        }
示例#2
0
        static void FindOlder(List <People> pp)
        {
            People oldMan = pp.OrderByDescending(n => n.Age).FirstOrDefault();

            Console.WriteLine("Самый старший: " + oldMan.Name + " - " + oldMan.Age);
        }