Write the below code in a console application.
- class Program
- {
- static void Main(string[] args)
- {
- int[] numbers = {
- 12,
- 343,
- 345,
- 657,
- 4325,
- 2234,
- 234,
- 34
- };
- intMinimumNum = numbers.Min();
- Console.WriteLine("The minimum Number is {0}", MinimumNum);
- Console.ReadLine();
- }
- }
The output is:
We got the lowest number from a collection in LINQ.