public bool Equals(AbsentViewModel other) { if (Object.ReferenceEquals(other, null)) { return(false); } if (Object.ReferenceEquals(this, other)) { return(true); } return(IdStudent.Equals(other.IdStudent)); }
/// <summary> /// Determines whether the specified object is equal to the current object. /// </summary> /// <param name="obj">The object to compare with the current object.</param> /// <returns>Boolean true if the specified object is equal to the current object; otherwise, false.</returns> public override bool Equals(object obj) { if (obj == null) { return(false); } Result result = obj as Result; if (result == null) { return(false); } return(IdExam.Equals(result.IdExam) && IdStudent.Equals(result.IdStudent) && Mark.Equals(result.Mark)); }