TaskBaselineCompareTo Method (TaskBaseline) |
IComparable interface implementation.
Compares this instance to the specified Baseline object.
Namespace:
Aspose.Tasks
Assembly:
Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntaxpublic int CompareTo(
TaskBaseline other
)
Public Function CompareTo (
other As TaskBaseline
) As Integer
public:
virtual int CompareTo(
TaskBaseline^ other
) sealed
abstract CompareTo :
other : TaskBaseline -> int
override CompareTo :
other : TaskBaseline -> int Parameters
- other
- Type: Aspose.TasksTaskBaseline
the specified Baseline object to compare this instance to.
Return Value
Type:
Int32returns -1 if this instance is less than the specified object, 1 if this instance is greater than the specified object; otherwise returns 0
Implements
IComparableTCompareTo(T)
ExamplesShows how to check equality of baselines.
var project = new Project();
var task = project.RootTask.Children.Add("Task");
project.SetBaseline(BaselineType.Baseline);
var baseline1 = task.Baselines.ToList()[0];
var baseline2 = task.Baselines.ToList()[0];
Console.WriteLine("Baseline Number 1: " + baseline1.BaselineNumber);
Console.WriteLine("Baseline Number 2: " + baseline2.BaselineNumber);
Console.WriteLine("Are baselines equal: " + baseline1.Equals(baseline2));
See Also