Get Last Day Of Month - CSharp System

CSharp examples for System:DateTime Month

Description

Get Last Day Of Month

Demo Code


using System;/* www  .  j av  a  2s  .  c  om*/

public class Main{
        public static DateTime GetLastDayOfMonth(this DateTime datetime) {
            return GetFirstDayOfMonth(datetime).AddMonths(1).AddDays(-1);
        }
}

Related Tutorials