How to find the smallest value in int array with C#

1 Answer

0 votes
using System;
using System.Linq;

class Program
{
    static void Main() {
        int[] arr = { 6, 8, 3, 9, 2, 4, 5 };

        var min = arr.Min();

        Console.Write(min);
    }
}



/*
run:

2

*/

 



answered Mar 8, 2021 by avibootz

Related questions

...