To End Of Month - CSharp System

CSharp examples for System:DateTime Month

Description

To End Of Month

Demo Code


using System;/*from www. ja  v  a  2s . co  m*/

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

Related Tutorials