Class ReferenceEqualityComparer
- Namespace
- SunamoReflection
- Assembly
- SunamoReflection.dll
Compares objects by reference equality only, ignoring value equality. Used for deep copy cycle detection.
public class ReferenceEqualityComparer : EqualityComparer<object>, IEqualityComparer<object>, IEqualityComparer
- Inheritance
-
ReferenceEqualityComparer
- Implements
- Inherited Members
- Extension Methods
Methods
Equals(object?, object?)
Determines whether the two objects are the same reference.
public override bool Equals(object? x, object? y)
Parameters
Returns
- bool
True if both references point to the same object.
GetHashCode(object)
Returns the hash code of the object.
public override int GetHashCode(object obj)
Parameters
objobjectThe object to get the hash code for.
Returns
- int
Hash code, or 0 if null.