Monday, 26 August 2013

How to add TimeSpans together using LINQ when in a Dictionary collection

How to add TimeSpans together using LINQ when in a Dictionary collection

Is it possible to group up all equal keys in a Dictionary and add their
corresponding TimeSpans together using LINQ?
Something like this (but this doesnt work)
var p = myDictionaryStringTimeStamp.Sum(x => x.Value.Add(myTimeStamp);

No comments:

Post a Comment