using System.Collections.Generic;
public int Height { get; set; }
public int Width { get; set; }
public static void Main()
var p = new List<Pair>();
p.Add(new Pair() {Height = 18, Width = 22});
p.Add(new Pair() {Height = 44, Width = 24});
p.Add(new Pair() {Height = 3, Width = 64});
p.Add(new Pair() {Height = 15, Width = 34});
var max = p.Max(pair => pair.Height);
System.Console.WriteLine(max);