Set To End Of Day - CSharp System

CSharp examples for System:DateTime Day

Description

Set To End Of Day

Demo Code


using System;//from   w  w  w . ja  va 2  s .c om

public class Main{
        public static DateTime SetToEndOfDay(this DateTime date)
        {
            return new DateTime(date.Year, date.Month, date.Day).AddDays(1).AddTicks(-1);
        }
}

Related Tutorials