Exemplo n.º 1
0
        public override int GetHashCode()
        {
            int result = Vorname.GetHashCode();

            result = 31 * result + Nachname.GetHashCode();
            result = 31 * result + Geburtstag.GetHashCode();
            return(result);
        }
Exemplo n.º 2
0
        public override int GetHashCode()
        {   // easy-Variante
            int hashcode = 0;

            hashcode += Vorname.GetHashCode();
            hashcode += Nachname.GetHashCode();
            hashcode += Alter;
            hashcode += Convert.ToInt32(Kontostand);

            return(hashcode);
        }