Answers for "get max and min value inside a list in c#"

C#
1

how to find the max number in list c#

int max = MyList.Max();
Posted by: Guest on October-01-2021
0

list min and Max value in c#

var list = new List<int> { 1, 2, 3, 4, 5, 6, 7, 16, 17 };  
            // MAX  
            Console.WriteLine("MAX=>" + list.Max(z => z));  
            // MIN  
            Console.WriteLine("MIN=>" + list.Min(z => z));
Posted by: Guest on January-03-2022

Code answers related to "get max and min value inside a list in c#"

C# Answers by Framework

Browse Popular Code Answers by Language