Version

ConstraintDateTime Property

Returns or sets the constraining date/time for this task.
Syntax
'Declaration
 
Public Property ConstraintDateTime As Date
public DateTime ConstraintDateTime {get; set;}
Exceptions
ExceptionDescription
SummaryTaskExceptionThrown if the property is set for a summary task.
Remarks

Because the start and end times for a summary task are determined by its descendants, the ConstraintDateTime property cannot be set for a task; attempting to do so causes an exception to be thrown.

The ConstraintDateTime property is used in conjunction with the value of the Constraint property to define the constraining criteria for the beginning or completion of the task.

The ConstraintDateTime is not applicable when the Constraint property is set to 'AsSoonAsPossible' or 'AsLateAsPossible'. Under these settings, the associated project's start or end date, along with the dates of tasks that are dependent on this task, determine the actual start or end of the task.

In the absence of an explicit setting, the ConstraintDateTime "resolves" to the value of either the StartDateTime or EndDateTime property, depending on whether the Constraint property is set to a value that implies action on the start or finish of the task. When ConstraintDateTime is not explicitly set, the 'FinishNoEarlierThan', 'FinishNoLaterThan', 'StartNoEarlierThan', and 'StartNoLaterThan' settings play a part in determining the resolved start date/time for the task, but setting the StartDateTime/EndDateTime properties cannot cause a conflict since the 'no earlier than' and 'no later than' settings implicitly move the constraint to accommodate those property values. Assigning a dependency that conflicts with a resolved constraining date/time, however, will cause the TaskConstraintViolation event to fire.

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