IEqualityComparer: Equals |
Determines whether the specified values are equal.
Public Function Equals( ByRef x As Variant, ByRef y As Variant ) As Boolean
Implement this method to provide a customized equality comparison for values.
Notes to Implementers
The Equals method is reflexive, symmetric, and transitive. That is, it returns True if used to compare a value with itself; True for two values x and y if it is True for y and x; and True for two values x and z if it is True for x and y and also True for y and z.
Implementations are required to ensure that if the Equals method returns true for two values x and y, then the value returned by the GetHashCode method for x must equal the value returned for y.
Exception | Condition |
---|---|
ArgumentException | x and y are of different types and neither one can handle comparisons with the other. |