Answers for "method to find max value in list c#"

C#
1

how to find the max number in list c#

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

c# list max

var values = new List<int> { 2, 9, 1, 3 };
Console.WriteLine(values.Max()); // Output: 9

var otherValues = new List<int?> { 2, 9, 1, 3, null };
Console.WriteLine(otherValues.Max()); // Output: 9
Posted by: Guest on May-17-2021

Code answers related to "method to find max value in list c#"

C# Answers by Framework

Browse Popular Code Answers by Language