TaskLink

Represents a predecessor link.

public class TaskLink : IEquatable<TaskLink>

Properties

Name Description
CrossProjectName { get; set; } Gets or sets the external predecessor project.
IsCrossProject { get; set; } Gets or sets a value indicating whether a predecessor is part of another project.
LagFormat { get; set; } Gets or sets the format for expressing the lag format.
LinkLag { get; set; } Gets or sets the amount of lag in tenths of a minute or percentage.
LinkType { get; set; } Gets or sets the type of a link.
PredTask { get; set; } Gets or sets the predecessor task.
SuccTask { get; set; } Gets or sets the successor task.

Methods

Name Description
override Equals(object) Returns a value indicating whether this instance is equal to a specified object.
Equals(TaskLink) Returns a value indicating whether this instance is equal to a specified object.
override GetHashCode() Returns a hash code value for the instance of the TaskLink class.
override ToString() Returns string representation of a TaskLink. The exact details of the representation are unspecified and subject to change.

Examples

Shows how to read project task links.

var project = new Project(DataDir + "GetPredecessorSuccessorTasks.mpp");

// Display names of predecessor and successor tasks
foreach (var taskLink in project.TaskLinks)
{
    Console.WriteLine("Predecessor: " + taskLink.PredTask.Get(Tsk.Name));
    Console.WriteLine("Successor: " + taskLink.SuccTask.Get(Tsk.Name));
    Console.WriteLine("Lag Format: " + taskLink.LagFormat);
    Console.WriteLine("Link Lag: " + taskLink.LinkLag);
    Console.WriteLine();
}

See Also