Think In Geek

In geek we trust

Get the number of days in a month in .NET

If you’ve ever wondered how to get the number of days for a given month in .NET, the solution is pretty easy:

System.DateTime.DaysInMonth(int year, int month)

Hope it helps!

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn


Leave a Reply

Your email address will not be published. Required fields are marked *