我如何能找到一个月的最后一天,在C#?
How can I find the last day of the month in C#?
例如。如果我有日期1980年3月8日,我怎么弄8月的最后一天(在本例中31)?
e.g. if I have the date 03/08/1980, how do I get the last day of month 8 (in this case 31)?
你得到这样的月份,它返回31年的最后一天:
The last day of the month you get like this, which returns 31:
DateTime.DaysInMonth(1980, 08);