I have a collection of objects that include a TimeSpan variable:
MyObject { TimeSpan TheDuration { get; set; } }
I want to use LINQ to
You can use .Aggregate rather than .Sum, and pass it a timespan-summing function that you write, like this:
.Aggregate
.Sum
TimeSpan AddTimeSpans(TimeSpan a, TimeSpan b) { return a + b; }