コード例 #1
0
            public override int GetHashCode()
            {
                int hashCode = -499023121;

                hashCode = hashCode * -1521134295 + Id.GetHashCode();
                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Nom);

                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Postnom);

                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Prenom);

                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Email);

                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(NomUtilisateur);

                hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(MotDePasse);

                hashCode = hashCode * -1521134295 + Sexe.GetHashCode();
                hashCode = hashCode * -1521134295 + DataNascimento.GetHashCode();
                hashCode = hashCode * -1521134295 + NiveauAcces.GetHashCode();
                return(hashCode);
            }
コード例 #2
0
 /// <summary>
 /// Renvoie un HashCode
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(base.GetHashCode() + 17 * Sexe.GetHashCode() + 17 * Pere.GetHashCode() + 17 + Mere.GetHashCode() + 17 * Dtn.GetHashCode() + 17 * Dtd.GetHashCode());
 }