コード例 #1
0
ファイル: Visit.cs プロジェクト: bachm44/SE-project
 /// <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 (VisitId != null)
         {
             hashCode = hashCode * 59 + VisitId.GetHashCode();
         }
         if (Date != null)
         {
             hashCode = hashCode * 59 + Date.GetHashCode();
         }
         if (Price != null)
         {
             hashCode = hashCode * 59 + Price.GetHashCode();
         }
         if (RequiredActions != null)
         {
             hashCode = hashCode * 59 + RequiredActions.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (AssignedEmployees != null)
         {
             hashCode = hashCode * 59 + AssignedEmployees.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hash = 13;

            hash += (hash * 43) + VisitId.GetHashCode();

            return(hash);
        }