using System.Collections;
using System.Collections.Generic;
public static void Main()
new Item {ComputerName="Comp1",UsedVolume=1,FreeVolume=1, Date=DateTime.Now.Date.AddMinutes(5)},
new Item {ComputerName="Comp1",UsedVolume=2,FreeVolume=1, Date=DateTime.Now.Date.AddMinutes(15)},
new Item {ComputerName="Comp2",UsedVolume=3,FreeVolume=1, Date=DateTime.Now.Date.AddMinutes(5)},
new Item {ComputerName="Comp2",UsedVolume=0,FreeVolume=1, Date=DateTime.Now.Date.AddMinutes(10)},
new Item {ComputerName="Comp1",UsedVolume=1,FreeVolume=1, Date=DateTime.Now.Date.AddMinutes(5)}
var finalSub= lst.OrderByDescending(x=>x.Date).ThenBy(x=>x.UsedVolume)
.Select(x=>new{ComputerName=x.ComputerName,UsedVolume=x.UsedVolume,FreeVolume=x.FreeVolume,Date=x.Date})
.GroupBy(g=> new {ComputerName=g.ComputerName}).Select(x=>new Item{ComputerName=x.Key.ComputerName,UsedVolume=x.Max(y=>y.UsedVolume),FreeVolume=x.Where(y=>y.UsedVolume==(x.Max(z=>z.UsedVolume))).First().FreeVolume});
foreach(var res in finalSub)
Console.WriteLine("{0} - {1} - {2}", res.ComputerName, res.UsedVolume,res.FreeVolume);
public string ComputerName { get; set; }
public double UsedVolume { get; set; }
public double FreeVolume { get; set; }
public DateTime Date {get;set;}