c# list max value code example
Example: 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
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