Version 3.3.1.2

ReferenceEqualityComparer<T> class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public class ReferenceEqualityComparer<T> : IEqualityComparer<T> where T : class
Compares objects by reference only, ignoring equality operators completely. This is used by the property tree reference dictionaries to keep track of references.
Inheritance
  • System.Object
  • ReferenceEqualityComparer<T>

Type Parameters

T

Constructors

ReferenceEqualityComparer()
public ReferenceEqualityComparer()

Fields

Default
A default, cached instance of this generic variant of the reference equality comparer.
public static readonly ReferenceEqualityComparer<T> Default

Methods

Equals(T, T)
Returns true if the object references are equal.
public bool Equals(T x, T y)
Parameters
T x

T y

Returns
System.Boolean

GetHashCode(T)
Returns the result of the object's own GetHashCode method.
public int GetHashCode(T obj)
Parameters
T obj

Returns
System.Int32