Is The Same Date - CSharp System

CSharp examples for System:DateTime Time

Description

Is The Same Date

Demo Code



public class Main{
        public static bool IsTheSameDate(this DateTime dt, DateTime obj)
        {//from  ww  w. j  a  v a 2 s  . co m
            if ((dt != null) && (obj != null))
                return (bool)((dt.Year == obj.Year) && (dt.Month == obj.Month) && (dt.Day == obj.Day));
            return false;
        }
}

Related Tutorials