What are the requirements for overloading the Object class's Equals() method?
What will be an ideal response?
If you overload the Equals() method, it should meet the following requirements by convention:
* Its header should be as follows (you can use any identifier for the Object parameter):
public override bool Equals(Object o)
* It should return false if the argument is null.
* It should return true if an object is compared to itself.
* It should return true only if both of the following are true:
oneObject.Equals(anotherObject)
anotherObject.Equals(oneObject)
* If oneObject.Equals(anotherObject) returns true and
oneObject.Equals(aThirdObject) returns true, then
anotherObject.Equals(aThirdObject) should also be true.
You might also like to view...
Custom file properties that are added to files as key words are called tags
Indicate whether the statement is true or false
If you want to unmerge cells you click the Unmerge alignment option
Indicate whether the statement is true or false