Esempio n. 1
0
        public override bool Equals(Object obj)
        {
            // Check for null values and compare run-time types.
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            Rubrique r = (Rubrique)obj;

            return(IdRub == r.IdRub && NomRub == r.NomRub);
        }
Esempio n. 2
0
        public int GetHashCode(Rubrique rub)
        {
            if (object.ReferenceEquals(rub, null))
            {
                return(0);
            }

            int hashCodeIdRub  = rub.IdRub == null ? 0 : rub.IdRub.GetHashCode();
            int hashCodeNomRub = rub.NomRub.GetHashCode();
            int hasCodeTextRub = rub.TextRub.GetHashCode();

            return(hashCodeIdRub ^ hashCodeNomRub ^ hasCodeTextRub);
        }