/// <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 (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (FechaCreacion != null) { hashCode = hashCode * 59 + FechaCreacion.GetHashCode(); } if (Descripcion != null) { hashCode = hashCode * 59 + Descripcion.GetHashCode(); } if (IndFinalizada != null) { hashCode = hashCode * 59 + IndFinalizada.GetHashCode(); } if (FechaVencimiento != null) { hashCode = hashCode * 59 + FechaVencimiento.GetHashCode(); } if (Usuario != null) { hashCode = hashCode * 59 + Usuario.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Tarea instances are equal /// </summary> /// <param name="other">Instance of Tarea to be compared</param> /// <returns>Boolean</returns> public bool Equals(Tarea other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( FechaCreacion == other.FechaCreacion || FechaCreacion != null && FechaCreacion.Equals(other.FechaCreacion) ) && ( Descripcion == other.Descripcion || Descripcion != null && Descripcion.Equals(other.Descripcion) ) && ( IndFinalizada == other.IndFinalizada || IndFinalizada != null && IndFinalizada.Equals(other.IndFinalizada) ) && ( FechaVencimiento == other.FechaVencimiento || FechaVencimiento != null && FechaVencimiento.Equals(other.FechaVencimiento) ) && ( Usuario == other.Usuario || Usuario != null && Usuario.Equals(other.Usuario) )); }