using System.Collections.Generic;
public static void Main()
List<List_Data> List1 = new List<List_Data>();
List1.Add(new List_Data{Material = "1", Batch = "B1", QTY = 5});
List1.Add(new List_Data{Material = "1", Batch = "B2", QTY = 5});
List1.Add(new List_Data{Material = "2", Batch = "B1", QTY = 15});
List<List_Data> List2 = new List<List_Data>();
List2.Add(new List_Data{Material = "1", Batch = "B1", QTY = 2});
List2.Add(new List_Data{Material = "3", Batch = "B1", QTY = 5});
List2.Add(new List_Data{Material = "3", Batch = "B2", QTY = 15});
.GroupBy( e => e.key, e => e.QTY )
.Select(g => new Report_Class
Material = g.Key.Material,
foreach (var r in result)
Console.WriteLine("Material = {0}, Batch = {1}, Difference = {2}", r.Material, r.Batch, r.Difference);
public class Report_Class