Version 2.1.0.0

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

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.