コード例 #1
0
ファイル: Task.cs プロジェクト: JStein92/todolist_SQL
 public override bool Equals(System.Object otherTask)
 {
     if (!(otherTask is Task))
     {
         return(false);
     }
     else
     {
         Task newTask             = (Task)otherTask;
         bool idEquality          = this.GetId() == newTask.GetId();
         bool descriptionEquality = this.GetDescription() == newTask.GetDescription();
         bool completedEquality   = this.GetCompleted() == newTask.GetCompleted();
         bool dueDateEquality     = this.GetDueDate() == newTask.GetDueDate();
         return(idEquality && descriptionEquality && dueDateEquality && completedEquality);
     }
 }