I have settings object with property
class Settings { DateTime StartTime; DateTime EndTime; }
and I have created a list of this setting
Do it like this
var max = (from item in myList select item.StartTime - item.EndTime).Max() var min = (from item in myList select item.StartTime - item.EndTime).Min()