Program to find largest element in an array | C # program to find maximum in arr [ ] of size n ; returns maximum in arr [ ] of size n ; Driver code
using System ; using System . Linq ; public class GFG { static int largest ( int [ ] arr , int n ) { return arr . Max ( ) ; } static public void Main ( ) { int [ ] arr = { 10 , 324 , 45 , 90 , 9808 } ; int n = arr . Length ; Console . WriteLine ( largest ( arr , n ) ) ; } }