public static void Main() {
new { Key = "A", Value = 1 },
new{ Key = "A", Value = 2 },
new{ Key = "B", Value = 1 },
new{ Key = "C", Value = 2 },
new{ Key = "C", Value = 3 },
var output = input.GroupBy(i=> i.Key).ToDictionary(g => g.Key, h => h.Max(p => p.Value));
foreach (var kvp in output)
Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value);