using System.Collections.Generic; namespace AlicizaX { internal sealed class ReferenceComparer : IEqualityComparer where T : class { public static readonly ReferenceComparer Instance = new ReferenceComparer(); private ReferenceComparer() { } public bool Equals(T x, T y) => ReferenceEquals(x, y); public int GetHashCode(T obj) => System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(obj); } }