Parent and Child Tasks

Tasks can be organized in a hierarchy. When a task has one or more tasks beneath it, they are referred to as parents. The tasks underneath are called children.

Working with Parent Tasks and Children

The Task class exposes classes that help you determine a

Parent and Child Tasks in Microsoft Project

To declare a task as a parent or a child task in Microsoft Project:

  1. In the Task Entry form, select a task and click it.
  2. Select Outdent to turn a task into a parent, or,
  3. Select Indent to turn a task into a child.

Getting Parent and Child Tasks

The following examples show viewing parent and child tasks in a project using Aspose.Tasks.

 1Project project = new Project("New Project.mpp");
 3// Create a ChildTasksCollector instance
 4ChildTasksCollector collector = new ChildTasksCollector();
 6// Collect all the tasks from RootTask using TaskUtils
 7TaskUtils.Apply(project.RootTask, collector, 0);
 9// Parse through all the collected tasks
10foreach (Task task in collector.Tasks)
12    Console.WriteLine(task.Get(Tsk.Name));
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.