public void UsingLinqForeach() { ListA.ForEach(itemA => { ListB.ForEach(itemB => { if (itemA.P1 == itemB.P1) { itemA.P2 = itemB.P2; } }); }); }