System.Globalization.JulianCalendar.CheckMonthRange C# (CSharp) Method

CheckMonthRange() private method

private CheckMonthRange ( int month ) : void
month int
return void
        internal void CheckMonthRange(int month) {
            if (month < 1 || month > 12) {
                throw new ArgumentOutOfRangeException("month", Environment.GetResourceString("ArgumentOutOfRange_Month"));
            }
        }

Usage Example

Example #1
0
 /// <summary>Returns the number of days in the specified month in the specified year in the specified era.</summary>
 /// <param name="year">An integer that represents the year. </param>
 /// <param name="month">An integer from 1 to 12 that represents the month. </param>
 /// <param name="era">An integer that represents the era. </param>
 /// <returns>The number of days in the specified month in the specified year in the specified era.</returns>
 /// <exception cref="T:System.ArgumentOutOfRangeException">
 ///         <paramref name="era" /> is outside the range supported by the calendar. -or-
 ///         <paramref name="year" /> is outside the range supported by the calendar.-or-
 ///         <paramref name="month" /> is outside the range supported by the calendar. </exception>
 // Token: 0x06002F4E RID: 12110 RVA: 0x000B5554 File Offset: 0x000B3754
 public override int GetDaysInMonth(int year, int month, int era)
 {
     this.CheckYearEraRange(year, era);
     JulianCalendar.CheckMonthRange(month);
     int[] array = (year % 4 == 0) ? JulianCalendar.DaysToMonth366 : JulianCalendar.DaysToMonth365;
     return(array[month] - array[month - 1]);
 }
All Usage Examples Of System.Globalization.JulianCalendar::CheckMonthRange