I have settings object with property
class Settings { DateTime StartTime; DateTime EndTime; }
and I have created a list of this setting
Assuming you want a minimum and maximum of the time deltas:
Settings[] settings = ...; var max = settings.Max(s => s.EndTime - s.StartTime); var min = settings.Min(s => s.EndTime - s.StartTime);