// Create the meeting.
Appointment meeting = new Appointment(service);
// Set properties on the meeting.
meeting.Subject = "Weekly Meeting on Monday";
meeting.Body = "This one hour meeting will recur every Monday, effective January 1, 2009, and continuing indefinitely.";
meeting.Start = new DateTime(2009, 1, 1, 10, 0, 0);
meeting.End = meeting.Start.AddHours(1);
meeting.Location = "Conf Room 1";
meeting.RequiredAttendees.Add("User1@contoso.com");
// Set the recurrence information on the meeting.
// The meeting will recur every Monday, effective January 1, 2009, and continuing indefinitely.
DayOfTheWeek[] days = new DayOfTheWeek[] { DayOfTheWeek.Monday };
meeting.Recurrence = new Recurrence.WeeklyPattern(meeting.Start.Date, 1, days);
meeting.Recurrence.StartDate = meeting.Start.Date;
// Create the meeting and send the meeting invitation to attendees.
meeting.Save(SendInvitationsMode.SendOnlyToAll);
// Create the appointment.
Appointment appointment = new Appointment(service);
// Set properties on the appointment.
appointment.Subject = "Bi-Weekly Appointment (Monday, Wednesday)";
appointment.Body = "This one hour appointment will recur on Monday and Wednesday of every second week, effective January 1, 2009, through March 31, 2009.";
appointment.Start = new DateTime(2009, 1, 1, 10, 0, 0);
appointment.End = appointment.Start.AddHours(1);
// Set the recurrence information on the appointment.
// The appointment will recur on Monday and Wednesday of every second week, effective January 1, 2009, through March 31, 2009.
DayOfTheWeek[] days2 = new DayOfTheWeek[] { DayOfTheWeek.Monday, DayOfTheWeek.Wednesday };
appointment.Recurrence = new Recurrence.WeeklyPattern(appointment.Start.Date, 2, days2);
appointment.Recurrence.StartDate = appointment.Start.Date;
appointment.Recurrence.EndDate = new DateTime(2009, 3, 31);
// Save the recurring series.
appointment.Save();