System.Globalization.UmAlQuraCalendar.GetMonthsInYear C# (CSharp) Méthode

GetMonthsInYear() public méthode

public GetMonthsInYear ( int year, int era ) : int
year int
era int
Résultat int
        public override int GetMonthsInYear(int year, int era) {
            CheckYearRange(year, era);
            return (12);
        }

Usage Example

Exemple #1
0
 private void BackButton_Click(object sender, System.EventArgs e)
 {
     //if condition checks whehter increasing the month takes it into the next year and acts accordingly
     try
     {
         if (m_selectedMonth == UmAlQuraInstance.GetMonthsInYear(m_selectedYear))
         {
             m_selectedYear += 1;
             m_selectedMonth = 1;
         }
         else
         {
             m_selectedMonth += 1;
         }
     }
     catch (ArgumentException exception)
     {
         MessageBox.Show(exception.Message);
     }
     try
     {
         if (m_selectedDay == 30 && UmAlQuraInstance.GetDaysInMonth(m_selectedYear, m_selectedMonth) < 30)
         {
             m_selectedDay = 29;
         }
     }
     catch (ArgumentException exception)
     {
         MessageBox.Show(exception.Message);
     }
     Painter();
 }