So, here\'s the scenario. I have a file with a created time, and I want to choose a time from a list of times that that file\'s created time is closest or equal too...what w
var creationTimes = new [] {DateTime.Now.AddDays(-1), DateTime.Now.AddDays(-2)};
FileInfo fi = new FileInfo("C:/test.xml");
var closestTime = creationTimes
.OrderBy(c => Math.Abs(c.Subtract(fi.CreationTime).Days))
.First();