Hello
We are storing recurrence rules string in appointment table. Now we need to generate recurrences for the rule stored in appointment table. We try to create object of recurrence rule with the examples found in your forum by passing the RecurrencePattern object as in posted code below but it gives an error of having no such constructor. is there any other way to get recurrences for recurrence rule string.
Appointment fitnessAppointment = new Appointment();
fitnessAppointment.Subject = "Fitness";
fitnessAppointment.Start = DateTime.Now;
fitnessAppointment.End = DateTime.Now.AddHours(2);
RecurrencePattern recurrencePattern = new RecurrencePattern();
recurrencePattern.Frequency = RecurrenceFrequency.Weekly;
recurrencePattern.MaxOccurrences = 30;
recurrencePattern.DaysOfWeekMask = RecurrenceDays.Monday | RecurrenceDays.Wednesday | RecurrenceDays.Friday;
RecurrenceRule recurrenceRule = new RecurrenceRule( recurrencePattern );
fitnessAppointment.RecurrenceRule = recurrenceRule;
we are using this code but gives an error that no such constructor is available for this class.
Thanks
Regards
Rahul M
We are storing recurrence rules string in appointment table. Now we need to generate recurrences for the rule stored in appointment table. We try to create object of recurrence rule with the examples found in your forum by passing the RecurrencePattern object as in posted code below but it gives an error of having no such constructor. is there any other way to get recurrences for recurrence rule string.
Appointment fitnessAppointment = new Appointment();
fitnessAppointment.Subject = "Fitness";
fitnessAppointment.Start = DateTime.Now;
fitnessAppointment.End = DateTime.Now.AddHours(2);
RecurrencePattern recurrencePattern = new RecurrencePattern();
recurrencePattern.Frequency = RecurrenceFrequency.Weekly;
recurrencePattern.MaxOccurrences = 30;
recurrencePattern.DaysOfWeekMask = RecurrenceDays.Monday | RecurrenceDays.Wednesday | RecurrenceDays.Friday;
RecurrenceRule recurrenceRule = new RecurrenceRule( recurrencePattern );
fitnessAppointment.RecurrenceRule = recurrenceRule;
we are using this code but gives an error that no such constructor is available for this class.
Thanks
Regards
Rahul M