DateTime.DaysInMonth returns 29 for feb. 2000?
i think i have a little issue, but i'm not sure, because it's either i am wrong or .Net 开发者_Go百科is wrong, and usually it is not .Net :)
but in my testscenario i did this:
DateTime.DaysInMonth(2000,2)
and it returned 29.
But as far as i know 400 years (0,400,800,1200 etc.) are not leap years?
.NET is correct: years that are divisible by 100 aren't leap years, unless they are also divisible by 400.
精彩评论