如何在 C# 中找到一个月的最后一天?
另一种方法:
DateTime today = DateTime.Today; DateTime endOfMonth = new DateTime(today.Year, today.Month, DateTime.DaysInMonth(today.Year, today.Month));