Table of Contents

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

x object

The first object.

y object

The second object.

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

obj object

The object to get the hash code for.

Returns

int

Hash code, or 0 if null.