TaskLinkEquals Method (TaskLink)

Returns a value indicating whether this instance is equal to a specified object.

Namespace:  Aspose.Tasks
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.5
public bool Equals(
	TaskLink other


Type: Aspose.TasksTaskLink
The specified instance of the TaskLink class to compare with this instance.

Return Value

Type: Boolean
True if the specified instance of the TaskLink class has the same predecessor and successor tasks as this instance; otherwise, false.


Shows how to check equality of task links.
var project = new Project(DataDir + "GetPredecessorSuccessorTasks.mpp");

var link1 = project.TaskLinks[0];
var link2 = project.TaskLinks[1];

// the equality of task links is based on pred and succ tasks.
Console.Write("Link 1 Pred: " + link1.PredTask.ToString());
Console.Write("Link 1 Succ: " + link1.SuccTask.ToString());
Console.Write("Link 2 Pred: " + link2.PredTask.ToString());
Console.Write("Link 2 Succ: " + link2.SuccTask.ToString());
Console.Write("Are task links equal: " + link1.Equals(link2));
See Also