Given an collection as 78, 92, 44, 63, 71, 97. The objective is to find the largest even number from the collection of numbers. The below program will do so
from System import *
from System.Collections.Generic import *
from System.Linq import *
class Program(object):
def Main(args):
Console.WriteLine(List[int](78, 92, 44, 63, 71, 97).TakeWhile().OrderByDescending().First())
Console.ReadKey()
Main = staticmethod(Main)
Output: 92