ASP.NET Pack Programmer's Guide
Schedule.GetFreePeriod Method (DateTime, DateTime, TimeSpan)
See Also
 





Returns the next period after the specified date with the specified duration which is not occupied by items.

Namespace: MindFusion.Scheduling
Package: MindFusion.Scheduling.WebForms

 Syntax

C#  Copy Code

public DateTime GetFreePeriod (
    DateTime from,
    DateTime to,
    TimeSpan duration
)

Visual Basic  Copy Code

Public Function GetFreePeriod( _
    from As DateTime, _
    to As DateTime, _
    duration As TimeSpan _
) As DateTime

 Parameters

from

The start date and time of the interval in which to search for a free period.

to

The end date and time of the interval in which to search for a free period.

duration

The required minimum duration of the period.

 Return Value

Type: DateTime
An instance of the System.DateTime structure that represents the start time of the period found or DateTime.MinValue if none.

 Remarks

If there are recurring items in the schedule, the function might take very long to execute especially if a period with the specified duration doesn't exist.

 See Also

GetFreePeriod Method Overload List
Schedule Members
Schedule Class
MindFusion.Scheduling Namespace