Is Within Date Range - CSharp System

CSharp examples for System:DateTime Calculate

Description

Is Within Date Range

Demo Code


using System.Collections.Generic;
using System;//from  w  ww  .j a  v  a2  s  .c om

public class Main{
        public static bool IsWithinDateRange(this DateTime date, DateTime startDate, DateTime endDate)
        {
            return date >= startDate && date <= endDate;
        }
}

Related Tutorials