Version

WeekNumber Property (WeekOfYear)

Returns the week number associated with this object.
Syntax
'Declaration
 
Public ReadOnly Property WeekNumber As Integer
public int WeekNumber {get;}
Example
This example uses the WeekOfYear object to display information about the first week of the year.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

    Private Sub GetFirstWeekOfYearInfo()

        '	Get the first week of the year from the component's WeeksOfYear collection
        Dim weekOfYear As Infragistics.Win.UltraWinSchedule.WeekOfYear
        weekOfYear = Me.ultraCalendarInfo1.WeeksOfYear(1)

        '	Display the week number
        Dim info As String = String.Empty
        info += "Week number " + weekOfYear.WeekNumber.ToString()

        '	Display the WeekOfYear object's enabled state
        If (weekOfYear.Enabled) Then
            info += " is enabled."
        Else
            info += " is disabled."
        End If

        MessageBox.Show(info, "GetFirstWeekOfYearInfo", MessageBoxButtons.OK)

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

		private void GetFirstWeekOfYearInfo()
		{
			
			//	Get the first week of the year from the component's WeeksOfYear collection
			Infragistics.Win.UltraWinSchedule.WeekOfYear weekOfYear;
			weekOfYear = this.ultraCalendarInfo1.WeeksOfYear[ 1 ];

			//	Display the week number
			string info = string.Empty;
			info += "Week number " + weekOfYear.WeekNumber.ToString();

			//	Display the WeekOfYear object's enabled state
			if ( weekOfYear.Enabled )
				info += " is enabled.";
			else
				info += " is disabled.";

			MessageBox.Show( info, "GetFirstWeekOfYearInfo", 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