Returns the number of days in the month specified by the year and month parameters.
[Visual Basic] Overloads Overridable Public Function GetDaysInMonth( _ ByVal year As Integer, _ ByVal month As Integer _ ) As Integer [C#] public virtual int GetDaysInMonth( int year, int month ); [C++] public: virtual int GetDaysInMonth( int year, int month ); [JScript] public function GetDaysInMonth( year : int, month : int ) : int;
he number of days in the specified month. For the month of February (month = 2), the returned value is 28 or 29 depending on whether year is a leap year.
Exception Type | Condition |
---|---|
ArgumentException | If month is out of range. |
Calendar Class | Calendar Members | System.Globalization Namespace | Calendar.GetDaysInMonth Overload List