TaskLinkEquals Method (Object)

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 override bool Equals(
	Object obj


Type: SystemObject
The object to compare with this instance.

Return Value

Type: Boolean
True if the specified object is a TaskLink that has the same predecessor and successor 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