TaskBaseline.Equals
Contents
[
Hide
]Equals(TaskBaseline)
Returns a value indicating whether this instance is equal to the specified TaskBaseline object.
public bool Equals(TaskBaseline other)
Parameter | Type | Description |
---|---|---|
other | TaskBaseline | the specified AssignmentBaseline object to compare with this instance. |
Return Value
returns true if this instance is equal to the specified TaskBaseline object; otherwise, false.
Examples
Shows how to check equality of baselines.
var project = new Project();
// creating TaskBaseline
var task = project.RootTask.Children.Add("Task");
project.SetBaseline(BaselineType.Baseline);
// display task baseline duration
var baseline1 = task.Baselines.ToList()[0];
var baseline2 = task.Baselines.ToList()[0];
// the equality of baselines is checked against to baseline's numbers.
Console.WriteLine("Baseline Number 1: " + baseline1.BaselineNumber);
Console.WriteLine("Baseline Number 2: " + baseline2.BaselineNumber);
Console.WriteLine("Are baselines equal: " + baseline1.Equals(baseline2));
See Also
- class TaskBaseline
- namespace Aspose.Tasks
- assembly Aspose.Tasks
Equals(object)
Returns a value indicating whether this instance is equal to a specified object.
public override bool Equals(object obj)
Parameter | Type | Description |
---|---|---|
obj | Object | The object to compare with this instance. |
Return Value
True if the specified object is a TaskBaseline that has the same UID value as this instance; otherwise, false.
Examples
Shows how to check equality of baselines.
var project = new Project();
// creating TaskBaseline
var task = project.RootTask.Children.Add("Task");
project.SetBaseline(BaselineType.Baseline);
// display task baseline duration
var baseline1 = task.Baselines.ToList()[0];
var baseline2 = task.Baselines.ToList()[0];
// the equality of baselines is checked against to baseline's numbers.
Console.WriteLine("Baseline Number 1: " + baseline1.BaselineNumber);
Console.WriteLine("Baseline Number 2: " + baseline2.BaselineNumber);
Console.WriteLine("Are baselines equal: " + baseline1.Equals(baseline2));
See Also
- class TaskBaseline
- namespace Aspose.Tasks
- assembly Aspose.Tasks