RecurrenceByDay Property

This is used to modify the BYDAY rule of a recurrence

Definition

Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public DayInstanceCollection ByDay { get; }

Property Value

DayInstanceCollection

Remarks

The collection contains a set of unique DayInstance values representing day of the week instances on which calculated recurrence dates can fall.

Example

C#
Recurrence r = new Recurrence();

// Set the properties
r.Frequency = RecurFrequency.Monthly;
r.StartDateTime = DateTime.Today;
r.Count = 20;

// Any Monday, Wednesday, or Friday
r.ByDay.AddRange(new DayOfWeek[] { DayOfWeek.Monday, DayOfWeek.Wednesday,
    DayOfWeek.Friday });

// Limit to the first and last in the set
r.BySetPos.AddRange(new int[] { 1, -1 });

// Get all instances generated by the recurrence
DateTimeCollection dc = r.AllInstances();

See Also