Equals

Equals(Resource)

Returns a value indicating whether this instance is equal to a specified instance of the Resource class.

public bool Equals(Resource other)
ParameterTypeDescription
otherResourceThe specified instance of the Resource class to compare with this instance.

Return Value

True if the specified instance of the Resource class has the same Uid value as this instance; otherwise, false.

Examples

Shows how to check resource equality.

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

var resource1 = project.Resources.GetById(1);
var resource2 = project.Resources.GetById(1);

Console.WriteLine("Are resources equal: " + resource1.Equals(resource2));

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 object to compare with this instance.

Return Value

True if the specified object is a Resource that has the same Uid value as this instance; otherwise, false.

Examples

Shows how to check resource equality.

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

var resource1 = project.Resources.GetById(1);
var resource2 = project.Resources.GetById(1);

Console.WriteLine("Are resources equal: " + resource1.Equals(resource2));

See Also