Calendar. Get Week OfYear(DateTime, CalendarWeekRule, DayOfWeek) Method
Returns the week of the year that includes the date in the specified DateTime object.
public: override int GetWeekOfYear(DateTime time, System::Globalization::CalendarWeekRule rule, DayOfWeek firstDayOfWeek);
[System.Runtime.InteropServices.ComVisible(false)] public override int GetWeekOfYear (DateTime time, System.Globalization.CalendarWeekRule rule, DayOfWeek firstDayOfWeek);
override this.GetWeekOfYear : DateTime * System.Globalization.CalendarWeekRule * DayOfWeek -> int
Public Overrides Function GetWeekOfYear (time As DateTime, rule As CalendarWeekRule, firstDayOfWeek As DayOfWeek) As Integer
A 1-based integer that represents the week of the year that includes the date in the
firstDayOfWeek is outside the range supported by the calendar.
rule is not a valid CalendarWeekRule value.