Task.Successors

Task.Successors property

Gets a TaskCollection object which contains all successors of this Task object.

public TaskCollection Successors { get; }

Return Value

Read-only instance of TaskCollection class.

Examples

Shows how to read task’s successors.

var project = new Project();
var pred = project.RootTask.Children.Add("Predecessor");
var succ = project.RootTask.Children.Add("Successor");

project.TaskLinks.Add(pred, succ);

foreach (var successor in pred.Successors)
{
    Console.WriteLine("{0} {1}", successor.Get(Tsk.Id), successor.Get(Tsk.Name));
}

See Also