Today, I have used Max (), Min () aggregate operators in my web project. It is very simple. Let’s start.
Make sure you have added using System.Linq; name space.
Here’s is the solution
List<int> numbers = new List<int>() { 10, 6, 5, 7, 3, 6, 1, -10, -5, 100 };
//Find Minimum Number
int minNumber = numbers.Min();
//Find Maximum Number
int MaxNumber = numbers.Max();
Output
Output when you will debug this code

Download
LinqExamples.zip (892.00 bytes)