Max method (with integers)
Description
The Max method finds the largest value in a sequence.
Sample
This sample finds the largest number a list of integers.
var data := List<int>{} { 5, 3, 1, 2, 4 }
var result := data:Max()
Console.WriteLine(result)
Output
5
Complete sample
using System
using System.Linq
using System.Collections.Generic
procedure Execute() as void strict
var data := List<int>{} { 5, 3, 1, 2, 4 }
var result := data:Max()
Console.WriteLine(result)
return