//public bool Equals(object obj) { public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } User other = (User)obj; /*return new EqualsBuilder(). * append(username, other.getUsername()). * isEquals();*/ if (username.Equals(other.getUsername())) { return(true); } else { return(false); } }