Task.Equals

Equals(Task)

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

public bool Equals(Task other)
ParameterTypeDescription
otherTaskThe specified task to compare with this instance.

Return Value

returns true if the specified task and this instance have equal unique ids.

Examples

Shows how to iterate over task’s assignments.

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

var collector = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, collector, 0);
foreach (var task in collector.Tasks)
{
    // display task's assignments
    foreach (var assignment in task.Assignments)
    {
        Console.WriteLine(assignment.ToString());
    }
}

See Also


Equals(object)

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

public override bool Equals(object obj)
ParameterTypeDescription
objObjectThe specified object to compare with this instance.

Return Value

returns true if the specified task and this instance have equal unique ids.

Examples

Shows how to iterate over task’s assignments.

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

var collector = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, collector, 0);
foreach (var task in collector.Tasks)
{
    // display task's assignments
    foreach (var assignment in task.Assignments)
    {
        Console.WriteLine(assignment.ToString());
    }
}

See Also