Initializes a new instance of the Recurrence class.
Namespace: MindFusion.Scheduling
Assembly: MindFusion.Scheduling
Syntax
C#
Copy Code
|
---|
public Recurrence () |
Visual Basic
Copy Code
|
---|
Public Sub New () |
Example
The following example creates a new recurrence object and associates it with an existing appointment. The example assumes that the appointment referenced by app already exists.
C#
Copy Code
|
---|
// Create a recurrence that happens at the third weekend // every three months, effective July 14th, 2005. // The recurrence is infinite Recurrence recurrence = new Recurrence(); recurrence.Pattern = RecurrencePattern.Monthly; recurrence.MonthlyRecurrence = MonthlyRecurrence.ByDayType; recurrence.Occurrence = Occurrence.Third; recurrence.Day = DayOfWeekType.Weekend; recurrence.Months = 3; recurrence.StartDate = new DateTime(2005, 7, 14); recurrence.RecurrenceEnd = RecurrenceEnd.Never;
// Associate the recurrence with the appointment app.Recurrence = recurrence; |
Visual Basic
Copy Code
|
---|
' Create a recurrence that happens at the third weekend ' every three months, effective July 14th, 2005. ' The recurrence is infinite Dim recurrence As New Recurrence() recurrence.Pattern = RecurrencePattern.Monthly recurrence.MonthlyRecurrence = MonthlyRecurrence.ByDayType recurrence.Occurrence = Occurrence.Third recurrence.Day = DayOfWeekType.Weekend recurrence.Months = 3 recurrence.StartDate = New DateTime(2005, 7, 14) recurrence.RecurrenceEnd = RecurrenceEnd.Never
' Associate the recurrence with the appointment app.Recurrence = recurrence |
See Also