/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (FirstName != null) { hashCode = hashCode * 59 + FirstName.GetHashCode(); } if (LastName != null) { hashCode = hashCode * 59 + LastName.GetHashCode(); } if (Currentpassword != null) { hashCode = hashCode * 59 + Currentpassword.GetHashCode(); } if (Newpassword != null) { hashCode = hashCode * 59 + Newpassword.GetHashCode(); } if (Phone != null) { hashCode = hashCode * 59 + Phone.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Userdetailchange instances are equal /// </summary> /// <param name="other">Instance of Userdetailchange to be compared</param> /// <returns>Boolean</returns> public bool Equals(Userdetailchange other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) ) && ( Currentpassword == other.Currentpassword || Currentpassword != null && Currentpassword.Equals(other.Currentpassword) ) && ( Newpassword == other.Newpassword || Newpassword != null && Newpassword.Equals(other.Newpassword) ) && ( Phone == other.Phone || Phone != null && Phone.Equals(other.Phone) )); }