Version

MonthsOfYear Property

Returns a collection of 12 MonthOfYear objects.
Syntax
'Declaration
 
Public ReadOnly Property MonthsOfYear As MonthsOfYearCollection
public MonthsOfYearCollection MonthsOfYear {get;}
Example
This example uses the MonthsOfYear property to get the name of the last month of the year in the current culture's calendar.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.IO
Imports System.Globalization

    Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click

        '	Get the MonthOfYear object that corresponds to the last month of the year
        Dim monthOfYear As MonthOfYear = Me.ultraCalendarInfo1.MonthsOfYear(Me.ultraCalendarInfo1.MonthsOfYear.Count)

        '	Display the long and short names for the month in a MessageBox
        Dim info As String = String.Empty
        info += "The long name for the last month of the year is '" + monthOfYear.LongDescriptionResolved + "'." + "\n"
        info += "The short name for the last month of the year is '" + monthOfYear.ShortDescriptionResolved + "'." + "\n"
        MessageBox.Show(info, "MonthsInYear", MessageBoxButtons.OK)

    End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.IO;
using System.Globalization;

		private void button1_Click(object sender, System.EventArgs e)
		{
		
			//	Get the MonthOfYear object that corresponds to the last month of the year
			MonthOfYear monthOfYear = this.ultraCalendarInfo1.MonthsOfYear[ this.ultraCalendarInfo1.MonthsOfYear.Count ];

			//	Display the long and short names for the month in a MessageBox
			string info = string.Empty;
			info += "The long name for the last month of the year is '" + monthOfYear.LongDescriptionResolved + "'." + "\n";
			info += "The short name for the last month of the year is '" + monthOfYear.ShortDescriptionResolved + "'." + "\n";
			MessageBox.Show( info, "MonthsInYear", MessageBoxButtons.OK );

		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also