I have two lists with equal size. Both contain numbers. The first list is generated and the second one is static. Since I have many of the generated lists, I want to find out wh
I don't think I want to garantee any direct improvment of efficiancy as I can't test it right now but this at least looks nicer:
if (combination.Count != histDates.Count) return decimal.MaxValue; return combination.Select((t, i) => Math.Abs(t - histDates[i].Value)).Sum();