Version

Add(DateTime,TimeSpan,String,String) Method

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

Parameters

startDateTime
The initial value for the StartDateTime property.
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 Constraint property to 'StartNoEarlierThan', and also initializes the value of the ConstraintDateTime property to the value of the startDateTime parameter.

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