How to get the shortest time and longest time(or timespan) from a list using LINQ?

Posted by shanthiram on Stack Overflow See other posts from Stack Overflow or by shanthiram
Published on 2010-04-28T13:16:24Z Indexed on 2010/04/28 13:33 UTC
Read the original article Hit count: 121

Filed under:

hi all,

I am trying to get the longest and shortest timespan in a list using LINQ. My code looks something like this

List listofTimeSpans = new List();

adding the timespans to listofTimeSpans in a foreach loop.

Please help me with this. Thank you.

© Stack Overflow or respective owner

Related posts about linq-to-objects