Version 3.3.1.2

FastTypeComparer class

Namespace: Sirenix.Serialization.Utilities
Assembly: Sirenix.Serialization
public class FastTypeComparer : IEqualityComparer<Type>
Compares types by reference before comparing them using the default type equality operator. This can constitute a *significant* speedup when used as the comparer for dictionaries.
Inheritance
  • System.Object
  • FastTypeComparer

Constructors

FastTypeComparer()
public FastTypeComparer()

Fields

Instance
public static readonly FastTypeComparer Instance

Methods

Equals(Type, Type)
public bool Equals(Type x, Type y)
Parameters
System.Type x

System.Type y

Returns
System.Boolean

GetHashCode(Type)
public int GetHashCode(Type obj)
Parameters
System.Type obj

Returns
System.Int32