Max on int array

image_pdfimage_print
   
 

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;

public class MainClass {
    public static void Main() {
        int[] myInts = new int[] { 974, 2, 7, 1374, 27, 54 };
        int maxInt = myInts.Max();
        Console.WriteLine(maxInt);
    }
}

    


This entry was posted in LINQ. Bookmark the permalink.