How to check List<> Contains with comparison on TimeSpan

Ive got a list of TimeSpans and I need to check if any of them are more than 5 hrs. I know I could just loop through the list, but if its possible I'd prefer to check for the condition using one of the built in functions for List<>.\[code\]if (driverSchedules.GetAllShifts().Contains(delegate(TimeSpan ts) { return ts > new TimeSpan(5,0,0);})){ return true;}\[/code\]*GetAllShifts returns a List.The error I'm getting says: \[code\]"Cannot convert anonymous method to type 'System.TimeSpan' because it is not a delegate type"\[/code\]As far as I can tell the "delegate type" is \[code\]System.TimeSpan\[/code\]
 
Back
Top