CalendarExceptionType

CalendarExceptionType enumeration

Specifies the calendar exception type.

public enum CalendarExceptionType

Values

NameValueDescription
Daily0Indicates Daily exception type.
YearlyByDay1Indicates Yearly by day of the month exception type.
YearlyByPosition2Indicates Yearly by position exception type.
MonthlyByDay3Indicates Monthly by day of the month exception type.
MonthlyByPosition4Indicates Monthly by position exception type.
Weekly5Indicates Weekly exception type.
ByDayCount6Indicates By day count exception type.
ByWeekDayCount7Indicates By weekday count exception type.
NoExceptionType8Indicates No exception type.

Examples

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
calendar.Exceptions.Add(exception);

See Also