DurationFormat

Tsk.DurationFormat field

Task duration format.

public static readonly Key<TimeUnitType, TaskKey> DurationFormat;

Examples

Shows how to set duration of the task.

var project = new Project();

var task = project.RootTask.Children.Add("Task1");
task.Set(Tsk.DurationFormat, TimeUnitType.Day);
task.Set(Tsk.Start, new DateTime(2012, 8, 23, 8, 0, 0));
task.Set(Tsk.Duration, project.GetDuration(24, TimeUnitType.Hour));
task.Set(Tsk.ActualStart, new DateTime(2012, 8, 23, 8, 0, 0));

project.Save(OutDir + "AddTaskDuration_out.xml", SaveFileFormat.Xml);

See Also