using System.Collections.Generic;
public static void Main()
List<Payment> A = new List<Payment>
new Payment { Period =1, Balance = 10 },
new Payment { Period =2, Balance = 12 },
new Payment { Period =3, Balance = 45 },
new Payment { Period =4, Balance = 23 },
new Payment { Period =5, Balance = 36 },
new Payment { Period =6, Balance = 45 }
List<Payment> B = new List<Payment>
new Payment { Period =1, Balance = 16 },
new Payment { Period =2, Balance = 13 },
new Payment { Period =3, Balance = 44 },
new Payment { Period =4, Balance = 33 },
new Payment { Period =5, Balance = 34 },
new Payment { Period =6, Balance = 35 }
List<Payment> result = A.Concat(B).GroupBy(x => x.Period)
Balance = x.Sum(z => z.Balance)
List<Payment> result1 = A.Zip(B, (first, second) => new Payment
Balance = first.Balance + second.Balance
foreach (var item in result1)
Console.WriteLine("Period : {0}", item.Period);
Console.WriteLine("Balance : {0}", item.Balance);
public int Period { get; set; }
public decimal Balance { get; set; }