Skip to main content

OccurrenceCalculator.FindNextOccurrenceTimeAfter(DateTime, Appointment) Method

Searches for the first occurrence which corresponds to the pattern, and starts after the specified time.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v14.2.Core.dll

#Declaration

public DateTime FindNextOccurrenceTimeAfter(
    DateTime after,
    Appointment pattern
)

#Parameters

Name Type Description
after DateTime

A DateTime object which specifies the time after which the search is performed.

pattern Appointment

An Appointment instance which is the pattern for the occurrence chain.

#Returns

Type Description
DateTime

A DateTime value which specifies the start time of the first appointment in the occurrence chain that starts after the specified time, or the DateTime.MaxValue in the case of an unsuccessful search.

#Remarks

If the method fails, it returns the MaxValue, which equals the "12/31/9999 11:59:59 PM" date value. The method can fail when no occurrences are found or if the specified recurrence information is incorrect.

NOTE

Exceptions (changed or deleted occurrences) are not found using this method since they could not be calculated from a pattern. They are stored as individual appointment records in a data source.

See Also