ByMonthWeekDayRepetition.Position
Contents
[
Hide
]ByMonthWeekDayRepetition.Position property
Gets or sets a position of weekday in a month on which the task must be recurring.
public OrdinalNumber Position { get; set; }
Examples
Shows how to work with month weekday repetitions while create a new recurring tasks.
var project = new Project(DataDir + "Project1.mpp");
var parameters = new RecurringTaskParameters
{
TaskName = "t1",
Duration = project.GetDuration(1, TimeUnitType.Day),
RecurrencePattern = new MonthlyRecurrencePattern
{
Repetition = new ByMonthWeekDayRepetition
{
Position = OrdinalNumber.First,
WeekDay = DayOfWeek.Sunday,
RepetitionInterval = 2
},
RecurrenceRange = new EndByRecurrenceRange
{
Start = new DateTime(2018, 7, 1, 8, 0, 0),
Finish = new DateTime(2018, 9, 2, 17, 0, 0)
}
}
};
project.RootTask.Children.Add(parameters);
project.Save(OutDir + "CanAddRecurringTask_Months_WeekDay_EndByRecurrenceRange_Test_out.mpp", SaveFileFormat.Mpp);
See Also
- enum OrdinalNumber
- class ByMonthWeekDayRepetition
- namespace Aspose.Tasks
- assembly Aspose.Tasks