CSharp examples for System:DateTime Day
Get month Days
using System.Web.UI.HtmlControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.WebControls; using System.Web.UI; using System.Web.Security; using System.Web; using System.Configuration; using System.Data; using System;/* w w w . ja v a2s .c o m*/ public class Main{ public static int monthDays(int month, int year) { switch (month) { case 2: if (IsLeapYear(year)) return (29); return (28); case 4: case 6: case 9: case 11: return (30); default: return (31); } } }