RecurrenceBySetPos Property

This is used to modify the BYSETPOS rule of a recurrence

Definition

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

Property Value

UniqueIntegerCollection

Remarks

The collection contains a set of unique integer values representing index positions that should be used to filter the set of recurrence dates calculated at each interval. Index values can be from -366 to +366 excluding zero. Negative values specify an index from the end of the set. Positive values specify an index from the start of the set. Zero is not a valid index value.

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