Max operator in Linq

Gopesh9
Posted by Gopesh9 under LINQ category on | Points: 40 | Views : 874
A simple example to show the maximum number in the array using Max operator.

int[] numbers = { 6, 2, 1, 1, 9, 8, 2, 7, 2, 0 }; 
int max = numbers.Max();
Console.WriteLine("The Maximum number in the list is ", max);

Comments or Responses

Login to post response