Version

GetMonth(YearMonthEnum,Int32) Method

Returns a Month object for a specified year and month.
Syntax
'Declaration
 
Public Overloads Function GetMonth( _
   ByVal month As YearMonthEnum, _
   ByVal year As Integer _
) As Month
public Month GetMonth( 
   YearMonthEnum month,
   int year
)

Parameters

month
Enum specifying the month of the year to return.
year
The year from which the month will be obtained.

Return Value

A Month object for the specified month and year.
Example
This example uses the GetMonth method to obtain the number of days in the current month.

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 Month object corresponding to the current month
        Dim month As Month
        month = Me.ultraCalendarInfo1.GetMonth(DateTime.Today)

        '	Display the number of days in the month
        MessageBox.Show("The number of days in the current month is " + month.DaysInMonth.ToString(), "GetMonth", 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 Month object corresponding to the current month
			Month month = null;
			month = this.ultraCalendarInfo1.GetMonth( DateTime.Today );

			//	Display the number of days in the month
			MessageBox.Show( "The number of days in the current month is " + month.DaysInMonth.ToString(), "GetMonth", 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