c# 获取月份的天数

 DateTime dtNow = Convert.ToDateTime(string date);
 int days = DateTime.DaysInMonth(dtNow.Year, dtNow.Month);

  

原文地址:https://www.cnblogs.com/webttt/p/11056748.html