I’m having trouble figuring out how to calculate the start date and end date of a task that has been added with some predessessors. Is this functionality already built it or do I have to manually calculate these fields? Also, if I changed some predesessors, the entire task start and end dates should shift, which means would I need to manually calculate them all?
var task = new Task(TaskName, Duration);project.RootTask.Children.Add(task);
// insert dependencies
if (Dependencies != null)
foreach (int dependency in Dependencies)
var depTask = project.GetTaskById(dependency);
if (depTask == null) continue; // TODO: throw error?
var taskLink = new TaskLink(depTask, task, TaskLinkType.FinishToStart);