Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if User instances are equal
        /// </summary>
        /// <param name="other">Instance of User to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(User other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                     ) &&
                 (
                     Laufort == other.Laufort ||
                     Laufort != null &&
                     Laufort.Equals(other.Laufort)
                 ) &&
                 (
                     EMail == other.EMail ||
                     EMail != null &&
                     EMail.Equals(other.EMail)
                 ) &&
                 (
                     Geburtsdatum == other.Geburtsdatum ||
                     Geburtsdatum != null &&
                     Geburtsdatum.Equals(other.Geburtsdatum)
                 ) &&
                 (
                     Laufniveau == other.Laufniveau ||
                     Laufniveau != null &&
                     Laufniveau.Equals(other.Laufniveau)
                 ) &&
                 (
                     Ziel == other.Ziel ||
                     Ziel != null &&
                     Ziel.Equals(other.Ziel)
                 ) &&
                 (
                     Profilbild == other.Profilbild ||
                     Profilbild != null &&
                     Profilbild.Equals(other.Profilbild)
                 ));
        }