获取某年的某月有多少天


var dayOfMonth = DateTime.DaysInMonth(Convert.ToInt32(year), Convert.ToInt32(month));

原文地址:https://www.cnblogs.com/zhoumeng780/p/4718613.html