SyntaxFix
Write A Post
Hire A Developer
Questions
Try this code it is already built in c#
int lastDay = DateTime.DaysInMonth (2014, 2);
and the first day is always 1.
Good Luck!