Is Between DateTime - CSharp System

CSharp examples for System:DateTime Calculate

Description

Is Between DateTime

Demo Code


using System;/*ww w. jav a  2s  .c  om*/

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

Related Tutorials