Creating appointment with Recurrences

Hi,

How do I create an Appointment having the following:

  1. Daily Recurrence Pattern every 2 days
  2. Set its Recurrence Range with Start: 22/4/2015 and specify one of the option from “Noendddate”, “End after 10 occurrences”, or “End by:”

Hi Aaron,

Thank you for writing to Aspose support team.

DailyRecurrencePattern can be used to generate such pattern by setting end date, occurrence count and interval as per the requirement. Following sample code shall demonstrate the usage according to the parameters set by user. Please give it a try and share your feedback with us.

MailAddressCollection coll = new MailAddressCollection();
Appointment testAEApp = new Appointment("Test Location 1", new DateTime(2015, 4, 22, 9, 0, 0), new DateTime(2015, 4, 22, 9, 30, 0), null, coll);
testAEApp.Description = "Test Body 1";
testAEApp.Summary = "Test Subject 1";
testAEApp.Method = AppointmentMethodType.Publish;
testAEApp.RecurrencePattern = new Aspose.Email.Mail.Calendaring.DailyRecurrencePattern(10, 2);
testAEApp.Save("Occurs10TimesAfterEvery2Days.ics", AppointmentSaveFormat.Ics);
testAEApp.RecurrencePattern = new Aspose.Email.Mail.Calendaring.DailyRecurrencePattern(new DateTime(2016, 1, 1), 2);
testAEApp.Save("AfterEvery2DaysEndByDate.ics", AppointmentSaveFormat.Ics);
testAEApp.RecurrencePattern = new Aspose.Email.Mail.Calendaring.DailyRecurrencePattern(0,2);
testAEApp.Save("AfterEvery2DAysNoEndDate.ics", AppointmentSaveFormat.Ics);