How to: Customize Yearly Recurrence
A yearly appointment that occurs every seventh day of February. Four occurrences are specified.
apt.RecurrenceInfo.Type = RecurrenceType.Yearly; apt.RecurrenceInfo.Periodicity = 1; apt.RecurrenceInfo.Start = apt.Start; apt.RecurrenceInfo.Month = 2; apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.None; apt.RecurrenceInfo.DayNumber = 7; apt.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount; apt.RecurrenceInfo.OccurrenceCount = 4;
An appointment occurs on the second Monday in August every two years. The chain has no end date.
apt.RecurrenceInfo.Type = RecurrenceType.Yearly; apt.RecurrenceInfo.Periodicity = 2; apt.RecurrenceInfo.Start = apt.Start; apt.RecurrenceInfo.Month = 8; apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.Second; apt.RecurrenceInfo.WeekDays = WeekDays.Monday; apt.RecurrenceInfo.Range = RecurrenceRange.NoEndDate;
An appointment occurs on the last day of every year for 10 years.
apt.RecurrenceInfo.Type = RecurrenceType.Yearly; apt.RecurrenceInfo.Periodicity = 1; apt.RecurrenceInfo.Start = apt.Start; apt.RecurrenceInfo.Month = 12; apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.Last; apt.RecurrenceInfo.WeekDays = WeekDays.EveryDay; apt.RecurrenceInfo.Range = RecurrenceRange.EndByDate; apt.RecurrenceInfo.End = apt.RecurrenceInfo.Start.AddYears(10);