Task.Predecessors
Task.Predecessors property
Gets a TaskCollection
object which contains all predecessors of this Task object.
public TaskCollection Predecessors { get; }
Return Value
Read-only instance of TaskCollection
class.
Examples
Shows how to read task’s predecessors.
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 predecessor in succ.Predecessors)
{
Console.WriteLine("{0} {1}", predecessor.Get(Tsk.Id), predecessor.Get(Tsk.Name));
}
See Also
- class TaskCollection
- class Task
- namespace Aspose.Tasks
- assembly Aspose.Tasks