Equivalence.GetEqualityComparerOrFallback<T> method (1 of 2)

Returns an equality comparer that calls IHasEquivalence.IsEquivalentTo.

public static IEqualityComparer<T> GetEqualityComparerOrFallback<T>()
parameter description
T The object type.

Return Value

The equality comparer.

Remarks

If T does not implement IHasEquivalence{T}, this method returns EqualityComparer{T}.Default as a fallback instead.

See Also


Equivalence.GetEqualityComparerOrFallback<T> method (2 of 2)

Returns an equality comparer that calls IHasEquivalence.IsEquivalentTo.

public static IEqualityComparer<T> GetEqualityComparerOrFallback<T>(IEqualityComparer<T> fallback)
parameter description
T The object type.

Return Value

The equality comparer.

Remarks

If T does not implement IHasEquivalence{T}, this method returns the specified fallback instead.

See Also