using System.Collections;
using System.Collections.Generic;
public static IList<Example> Examples;
public static void Main()
Program.Examples = new List<Example>
new Example("Example 1", new [] { 1, 2, 3, 4 }),
new Example("Example 2", new [] { 2, 3, 12}),
new Example("Example 3", new [] { 6, 3, 4, 5 }),
new Example("Example 4", new [] { 6, 4, 5 })
var results = Program.Examples.Select(ex => new { item = ex, highest = ex.Values.Max()})
.OrderByDescending(item => item.highest);
foreach(var result in results)
Console.WriteLine(result.item.Name + " " + result.highest);
public string Name { get; set; }
public IList<int> Values { get;set; }
public Example(string name, int[] values)