xxxxxxxxxx
public static class DateTimeExtensions
{
public static bool IsInRange(this DateTime dateToCheck, DateTime startDate, DateTime endDate)
{
return dateToCheck >= startDate && dateToCheck < endDate;
}
}
dateToCheck.IsInRange(startDate, endDate)