C# get the number of days in the current month

    DateTime dtNow = DateTime.Now;
    int days = DateTime.DaysInMonth(dtNow.Year ,dtNow.Month);

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325862927&siteId=291194637