Version

Add(TimeSpan,String,String) Method

Adds a new Task to this collection.
Syntax
'Declaration
 
Public Overloads Function Add( _
   ByVal duration As TimeSpan, _
   ByVal name As String, _
   ByVal projectKey As String _
) As Task
public Task Add( 
   TimeSpan duration,
   string name,
   string projectKey
)

Parameters

duration
The initial value for the Duration property.
name
The initial value for the Name property.
projectKey
The key of the associated Project.

Return Value

A reference to the resulting Task instance.
Remarks

Note: This overload automatically initializes the value of the task's StartDateTime property to the StartDate of the project referenced by the projectKey parameter. If 'projectKey' is empty, the start date of the UnassignedProject is used.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also