TaskUtilsTaskChildrenCount Method

Recursively calculates a number of task's children tasks through all levels.

Namespace:  Aspose.Tasks.Util
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 20.11
Syntax
public static int TaskChildrenCount(
	Task task
)

Parameters

task
Type: Aspose.TasksTask
The task which children calculate.

Return Value

Type: Int32
The number of children.
Examples
Shows how to use <see cref="Aspose.Tasks.Util.TaskUtils.TaskChildrenCount" /> method.
var project = new Project(DataDir + "Project2.mpp");

// recursively calculates a number of task's children tasks through all levels
var count = TaskUtils.TaskChildrenCount(project.RootTask);

Console.WriteLine("Number of tasks: " + count);
See Also