Take the first day of the following month and subtract 1 day from it.
Use the DateTime structure. This will return the number of days:
New DateTime(year, month, 1).AddMonths(1).AddDays(-1).Day
(Next Month, minus one day)
New DateTime(year, month, 1).AddMonths(1).AddDays(-1).Day
(Next Month, minus one day)
0 comments:
Post a Comment