unregisterEqualityComparer<T> static method

EqualityComparer<T> unregisterEqualityComparer<T>()

Unregisters an EqualityComparer object as the default comparer for type T, returning the comparer object that was removed.

If no comparer is registered for type T, the returned value is null.

Following a call to this method, LINQ methods that attempt to call EqualityComparer.forType for the type T will instead get the default comparer until a comparer for T is provided again with a call to EqualityComparer.registerEqualityComparer.

Implementation

static EqualityComparer<T> unregisterEqualityComparer<T>() {
  return _registeredEqualityComparers.remove(T) as EqualityComparer<T>;
}