Represents a definitions of working days.
For a list of all members of this type, see CalendarPeriod Members.
System.Object
Aspose.Tasks.MPXRecord
Aspose.Tasks.CalendarPeriod
[Visual Basic]NotInheritable Public Class CalendarPeriod
[C#]public sealed class CalendarPeriod
: MPXRecord Thread Safety
Public static (Shared in Visual Basic) members of this type are
safe for multithreaded operations. Instance members are not guaranteed to be
thread-safe.
Example
[C#]
// Create an empty MPX project file
MPXFile file = new MPXFile();
// Create default base calendar for the project
file.AddDefaultBaseCalendar();
Calendar cal = file.GetBaseCalendar(Calendar.DefaultBaseCalendarName);
// Set Christmas holidays
CalendarPeriod ch = cal.AddCalendarPeriod();
ch.FromDate = new System.DateTime(2004, 12, 24);
ch.ToDate = new System.DateTime(2004, 12, 31);
ch.Working = false;
[Visual Basic]
' Create an empty MPX project file
Dim file As MPXFile = New MPXFile()
' Create default base calendar for the project
file.AddDefaultBaseCalendar()
Dim cal As Calendar = file.GetBaseCalendar(Calendar.DefaultBaseCalendarName)
' Set Christmas holidays
Dim ch As CalendarPeriod = cal.AddCalendarPeriod()
ch.FromDate = New System.DateTime(2004, 12, 24)
ch.ToDate = New System.DateTime(2004, 12, 31)
ch.Working = False
Requirements
Namespace: Aspose.Tasks
Assembly: Aspose.Tasks (in Aspose.Tasks.dll)
See Also
CalendarPeriod Members | Aspose.Tasks Namespace