Sum of TimeSpans in C#
Unfortunately, there isn’t a an overload of Sum that accepts an IEnumerable<TimeSpan>. Additionally, there’s no current way of specifying operator-based generic constraints for type-parameters, so even though TimeSpan is “natively” summable, that fact can’t be picked up easily by generic code. One option would be to, as you say, sum up an integral-type equivalent to … Read more