public override bool Equals(object obj) //Implementação do Equals para comparar e confirmar o GetHashCode entre dois objetos.
        {
            if (!(obj is Product2))
            {
                return(false);
            }
            Product2 other = obj as Product2;

            return(Name2.Equals(other.Name2) && Price2.Equals(other.Price2));
        }
Ejemplo n.º 2
0
 public bool Equals(Entry other)
 {
     return(Name1.Equals(other.Name1) && Name2.Equals(other.Name2) && Score == other.Score && Mode == other.Mode);
 }