Filter.Equals

Equals(Filter)

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

public bool Equals(Filter other)
ParameterTypeDescription
otherFilterthe specified AssignmentBaseline object to compare with this instance.

Return Value

returns true if this instance is equal to the specified AssignmentBaseline object; otherwise, false.

Examples

Shows how to check filter equality.

var project = new Project(DataDir + "ReadFilterDefinitionData.mpp");
List<Filter> filters = project.TaskFilters.ToList();

var filter1 = filters[0];
var filter2 = filters[1];

// the equality of filters is checked against to filter's UID.
Console.WriteLine("Filter 1 UID: " + filter1.Uid);
Console.WriteLine("Filter 2 UID: " + filter2.Uid);
Console.WriteLine("Are filters equal: " + filter1.Equals(filter2));

See Also


Equals(object)

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

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

Return Value

returns true if this instance is equal to the specified AssignmentBaseline object; otherwise, false.

Examples

Shows how to check filter equality.

var project = new Project(DataDir + "ReadFilterDefinitionData.mpp");
List<Filter> filters = project.TaskFilters.ToList();

var filter1 = filters[0];
var filter2 = filters[1];

// the equality of filters is checked against to filter's UID.
Console.WriteLine("Filter 1 UID: " + filter1.Uid);
Console.WriteLine("Filter 2 UID: " + filter2.Uid);
Console.WriteLine("Are filters equal: " + filter1.Equals(filter2));

See Also