Project.TaskLinks
Project.TaskLinks property
Gets TaskLinkCollection
object.
public TaskLinkCollection TaskLinks { get; }
Examples
Shows how to create task links.
var project = new Project();
// Add new tasks
var pred = project.RootTask.Children.Add("Task 1");
var succ = project.RootTask.Children.Add("Task 2");
// Link tasks
project.TaskLinks.Add(pred, succ);
foreach (var link in project.TaskLinks)
{
Console.WriteLine("Predecessor Task: " + link.PredTask);
Console.WriteLine("Successor Task: " + link.SuccTask);
Console.WriteLine("LagFormat: " + link.LagFormat);
Console.WriteLine("LinkType: " + link.LinkType);
Console.WriteLine("LinkLag: " + link.LinkLag);
Console.WriteLine("CrossProjectName: " + link.CrossProjectName);
Console.WriteLine("IsCrossProject: " + link.IsCrossProject);
}
See Also
- class TaskLinkCollection
- class Project
- namespace Aspose.Tasks
- assembly Aspose.Tasks