CalendarException.Occurrences property

Gets or sets the number of occurrences for which the calendar exception is valid.

public int Occurrences { get; set; }


Shows how to define a calendar exception by occurrences.

var project = new Project();

// Define a calendar
var calendar = project.Calendars.Add("Calendar1");

// Define exception and specify occurrences
var exception = new CalendarException();
exception.EnteredByOccurrences = true;
exception.Occurrences = 5;
exception.Type = CalendarExceptionType.YearlyByDay;
exception.MonthDay = 22;
exception.Month = Month.April;

// Add exception to calendar

See Also