DurationTimeSpan Property |
Gets
TimeSpan instance of this Duration object.
Property Value
Type:
TimeSpanThe TimeSpan instance of this Duration object.
Namespace:
Aspose.Tasks
Assembly:
Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntaxpublic TimeSpan TimeSpan { get; }Public ReadOnly Property TimeSpan As TimeSpan
Get
public:
property TimeSpan TimeSpan {
TimeSpan get ();
}member TimeSpan : TimeSpan with get
Property Value
Type:
TimeSpan
ExamplesShows how to convert a duration to a time span.
var project = new Project(DataDir + "TaskDurations.mpp");
var task = project.RootTask.Children.GetById(1);
var duration = task.Get(Tsk.Duration);
Console.WriteLine("Time span of duration: " + duration.TimeSpan);
See Also