TaskKey enumeration

Represents a list of supported task fields.

public enum TaskKey : byte


Uid0Represents the Unique ID (Task) field.
Id1Represents the Id (Task) field.
Name2Represents the Name (Task) field.
Type3Represents the Type (Task) field.
IsNull4Represents the IsNull (Task) field.
Created5Represents the Created (Task) field.
Contact6Represents the Contact (Task) field.
WBS7Represents the WBS (Task) field.
WBSLevel8Represents the WBSLevel (Task) field.
OutlineNumber9Represents the OutlineNumber (Task) field.
OutlineLevel10Represents the OutlineLevel (Task) field.
Priority11Represents the Priority (Task) field.
Start12Represents the Start (Task) field.
Finish13Represents the Finish (Task) field.
Duration14Represents the Duration (Task) field.
DurationVariance15Represents the DurationVariance (Task) field.
DurationFormat16Represents the DurationFormat (Task) field.
Work17Represents the Work (Task) field.
Stop18Represents the Stop (Task) field.
Resume19Represents the Resume (Task) field.
IsResumeValid20Represents the IsResumeValid (Task) field.
IsEffortDriven21Represents the IsEffortDriven (Task) field.
IsRecurring22Represents the IsRecurring (Task) field.
IsOverallocated23Represents the IsOverallocated (Task) field.
HasOverallocatedResource24Represents the HasOverallocatedResource (Task) field.
IsEstimated25Represents the IsEstimated (Task) field.
IsMilestone26Represents the IsMilestone (Task) field.
IsCritical27Represents the IsCritical (Task) field.
IsSubproject28Represents the IsSubproject (Task) field.
IsSubprojectReadOnly29Represents the IsSubprojectReadOnly (Task) field.
IsMarked30Represents the IsMarked (Task) field.
IgnoreWarnings31Represents the IgnoreWarnings (Task) field.
SubprojectName32Represents the SubprojectName (Task) field.
IsExternalTask33Represents the IsExternalTask (Task) field.
IsSummary34Represents the IsSummary (Task) field.
ExternalTaskProject35Represents the ExternalTaskProject (Task) field.
ExternalId36Represents the ExternalId (Task) field.
EarlyStart37Represents the EarlyStart (Task) field.
EarlyFinish38Represents the EarlyFinish (Task) field.
LateStart39Represents the LateStart (Task) field.
LateFinish40Represents the LateFinish (Task) field.
StartVariance41Represents the StartVariance (Task) field.
FinishVariance42Represents the FinishVariance (Task) field.
WorkVariance43Represents the WorkVariance (Task) field.
CostVariance44Represents the CostVariance (Task) field.
FreeSlack45Represents the FreeSlack (Task) field.
TotalSlack46Represents the TotalSlack (Task) field.
StartSlack47Represents the StartSlack (Task) field.
FinishSlack48Represents the FinishSlack (Task) field.
FixedCost49Represents the FixedCost (Task) field.
FixedCostAccrual50Represents the FixedCostAccrual (Task) field.
PercentComplete51Represents the PercentComplete (Task) field.
PercentWorkComplete52Represents the PercentWorkComplete (Task) field.
Cost53Represents the Cost (Task) field.
OvertimeCost54Represents the OvertimeCost (Task) field.
ActualStart55Represents the ActualStart (Task) field.
ActualFinish56Represents the ActualFinish (Task) field.
ActualDuration57Represents the ActualDuration (Task) field.
ActualCost58Represents the ActualCost (Task) field.
ActualOvertimeCost59Represents the ActualOvertimeCost (Task) field.
ActualWork60Represents the ActualWork (Task) field.
ActualOvertimeWork61Represents the ActualOvertimeWork (Task) field.
OvertimeWork62Represents the OvertimeWork (Task) field.
RegularWork63Represents the RegularWork (Task) field.
RemainingDuration64Represents the RemainingDuration (Task) field.
RemainingCost65Represents the RemainingCost (Task) field.
RemainingWork66Represents the RemainingWork (Task) field.
RemainingOvertimeWork67Represents the RemainingOvertimeWork (Task) field.
RemainingOvertimeCost68Represents the RemainingOvertimeCost (Task) field.
ACWP69Represents the ACWP (Task) field.
CV70Represents the CV (Task) field.
SV71Represents the SV (Task) field.
ConstraintType72Represents the ConstraintType (Task) field.
Calendar73Represents the Calendar (Task) field.
ConstraintDate74Represents the ConstraintDate (Task) field.
Deadline75Represents the Deadline (Task) field.
LevelAssignments76Represents the LevelAssignments (Task) field.
LevelingCanSplit77Represents the LevelingCanSplit (Task) field.
LevelingDelay78Represents the LevelingDelay (Task) field.
PreleveledStart79Represents the PreleveledStart (Task) field.
PreleveledFinish80Represents the PreleveledFinish (Task) field.
Hyperlink81Represents the Hyperlink (Task) field.
HyperlinkAddress82Represents the HyperlinkAddress (Task) field.
HyperlinkSubAddress83Represents the HyperlinkSubAddress (Task) field.
IgnoreResourceCalendar84Represents the IgnoreResourceCalendar (Task) field.
HideBar85Represents the HideBar (Task) field.
IsRollup86Represents the IsRollup (Task) field.
BCWS87Represents the BCWS (Task) field.
BCWP88Represents the BCWP (Task) field.
PhysicalPercentComplete89Represents the PhysicalPercentComplete (Task) field.
EarnedValueMethod90Represents the EarnedValueMethod (Task) field.
ActualWorkProtected91Represents the ActualWorkProtected (Task) field.
ActualOvertimeWorkProtected92Represents the ActualOvertimeWorkProtected (Task) field.
IsPublished93Represents the IsPublished (Task) field.
IsScheduled94Represents the IsScheduled (Task) field.
StatusManager95Represents the StatusManager (Task) field.
CommitmentStart96Represents the CommitmentStart (Task) field.
CommitmentFinish97Represents the CommitmentFinish (Task) field.
CommitmentType98Represents the CommitmentType (Task) field.
IsManual99Represents the IsManual (Task) field.
IsExpanded100Represents the IsExpanded (Task) field.
Guid101Represents the Guid (Task) field.
NotesText102Represents the NotesText (Task) field.
NotesRTF103Represents the NotesRTF (Task) field.
ManualStart104Represents the ManualStart (Task) field.
ManualFinish105Represents the ManualFinish (Task) field.
ManualDuration106Represents the ManualDuration (Task) field.
BudgetWork107Represents the BudgetWork (Task) field.
BudgetCost108Represents the BudgetCost (Task) field.
DisplayAsSummary109Represents the DisplayAsSummary (Task) field.
SummaryProgress110Represents the Summary Progress (Task) field.
IsActive111Represents the IsActive (Task) field.
StartText112Represents the StartText (Task) field.
FinishText113Represents the FinishText (Task) field.
DurationText114Represents the DurationText (Task) field.
CalendarUid115Represents the CalendarUid (Task) field.
ParentTaskUid116Represents the ParentTaskUid (Task) field.
DisplayOnTimeline117Represents the DisplayOnTimeline (Task) field.
TaskIsAssigned118Represents the TaskIsAssigned (Task) field.
TaskOriginalStart119Represents the original start (Task) field.
TaskOriginalFinish120Represents the original finish (Task) field.
IsShowBeforeProjectStartDateWarning121Represents the flag which makes MSP show the warning that a task is starting before project start date.
Warning122Represents the flag which indicates that task has schedule discrepancies.
ParentTaskGuid123Represents the ParentTaskGuid (Task) field.
ActivityId124Represents the ActivityId field (only applicable to Primavera projects).
FreeSlackTimeSpan125Represents the FreeSlack (Task) field.
TotalSlackTimeSpan126Represents the TotalSlack (Task) field.
StartSlackTimeSpan127Represents the StartSlack (Task) field.
FinishSlackTimeSpan128Represents the FinishSlack (Task) field.
ExternalUid129Represents the Unique Id of external task.


Shows how to read/write task properties.

var project = new Project();

// Add task and set task properties
var task = project.RootTask.Children.Add();
task.Set(Tsk.Name, "Task1");
task.Set(Tsk.Start, new DateTime(2020, 3, 31, 8, 0, 0));
task.Set(Tsk.Finish, new DateTime(2020, 3, 31, 17, 0, 0));

var collector = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, collector, 0);

// Parse through all the collected tasks
foreach (var tsk in collector.Tasks)
    Console.WriteLine("Task Id: {0}", tsk.Get(Tsk.Id));
    Console.WriteLine("Task Uid: {0}", tsk.Get(Tsk.Uid));
    Console.WriteLine("Task Name: {0}", tsk.Get(Tsk.Name));
    Console.WriteLine("Task Start: {0}", tsk.Get(Tsk.Start));
    Console.WriteLine("Task Finish: {0}", tsk.Get(Tsk.Finish));

See Also