DurationTimeSpan Property

Gets TimeSpan instance of this Duration object.

Property Value

Type: TimeSpan
The TimeSpan instance of this Duration object.

Namespace:  Aspose.Tasks
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax
public TimeSpan TimeSpan { get; }

Property Value

Type: TimeSpan
Examples
Shows how to convert a duration to a time span.
var project = new Project(DataDir + "TaskDurations.mpp");
var task = project.RootTask.Children.GetById(1);

// get the task duration
var duration = task.Get(Tsk.Duration);
Console.WriteLine("Time span of duration: " + duration.TimeSpan);
See Also