コード例 #1
0
ファイル: Category.cs プロジェクト: jiwonk42/to-do-list-join
 public override bool Equals(System.Object otherCategory)
 {
     if (!(otherCategory is Category))
     {
         return(false);
     }
     else
     {
         Category newCategory        = (Category)otherCategory;
         bool     descritionEquality = this.GetDescription() == newCategory.GetDescription();
         bool     idEquality         = this.GetId() == newCategory.GetId();
         return(descritionEquality && idEquality);
     }
 }