private NRecurrenceMonthlyRule CreateRelativeMonthlyRule() { // Create a rule, which occurs on the last Sunday of every month NRecurrenceMonthlyRule rule = new NRecurrenceMonthlyRule(ENDayOrdinal.Last, ENDayOfWeek.Sunday); rule.StartDate = RuleStart; return(rule); }
private NRecurrenceMonthlyRule CreateAbsoluteMonthlyRule() { // Create a rule, which occurs on the third day of every other month // Use negative values for the last days of the month, for example -1 refers to the last day of the month NRecurrenceMonthlyRule rule = new NRecurrenceMonthlyRule(3); rule.StartDate = RuleStart; rule.Interval = 2; return(rule); }