using System; using System.Linq; using System.Collections.Generic; public class Test { class item { public string name {get;set;} public int identifier {get;set;} public item (int identifier, string name) { this.name = name; this.identifier = identifier; } public override string ToString () { return string.Format("{0} / {1}",this.identifier,this.name); } } public static void Main() { List List1 = new List(new item[]{ new item(1,"a"), new item(2,"abandon"), new item(3,"abandoned"), new item(4,"ability"), new item(5,"able"), new item(6,"about"), new item(7,"above"), new item(8,"abroad"), new item(9,"absence"), new item(10,"absent"), new item(11,"absolute"), new item(12,"absolutely"), new item(13,"absorb"), new item(14,"abuse"), new item(15,"abuse"), new item(16,"academic"), new item(17,"accent"), new item(18,"accept"), new item(19,"acceptable"), new item(20,"access"), new item(21,"accident"), new item(22,"accidental"), new item(23,"accidentally"), new item(24,"accommodation"), new item(25,"accompany"), new item(26,"according to"), new item(27,"account") }); List List2 = new List(new item[] { new item(5,"foo"), new item(9,"bar"), new item(14,"qux"), new item(25,"notinscope") }); Dictionary l2dic = List2.ToDictionary(x => x.identifier); item itm; foreach(item x in List1) { if(l2dic.TryGetValue(x.identifier,out itm)) { x.name = itm.name; } } //print entries foreach(item x in List1) { Console.WriteLine(x); } } }