Version

WorkingHours Property (DayOfWeek)

Returns a collection of TimeRange objects, each of which represents a range of time that is considered to be a continuous block of working hours.
Syntax
'Declaration
 
Public ReadOnly Property WorkingHours As TimeRangesCollection
public TimeRangesCollection WorkingHours {get;}
Remarks

The WorkingHours property makes it possible to designate multiple, discontiguous ranges of time as working hours for a particular date. For example, adding 2 TimeRange instances to the list, one for 9AM to 12PM, and another for 1PM to 5PM, would define the working hours for that date such that 12PM to 1PM would remain in the non-working hour range.

When the WorkingHours collection is non-empty, its contents fully describe the working hours for the associated date/day of the week, i.e., the WorkingHours collection takes precedence over the range defined by the WorkDayStartTime and WorkDayEndTime properties. Furthermore, as soon as one TimeRange is added to the collection, that TimeRange represents the only working hours, and replaces all other criteria. For example, consider a day which was previously considered a workday, with its working hours spanning 8AM to 5PM. If a TimeRange of 9AM to 12PM is added to the WorkingHours collection for the associated day of the week, the working hour range immediately becomes 9AM - 12PM, and no longer includes the hours which were previously considered part of the workday. As soon as working hours are defined in this manner, the developer assumes responsibility for fully defining the working hours.

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