Exemple #1
0
 /// <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 (FarmId != null)
         {
             hashCode = hashCode * 59 + FarmId.GetHashCode();
         }
         if (Date != null)
         {
             hashCode = hashCode * 59 + Date.GetHashCode();
         }
         if (Plant != null)
         {
             hashCode = hashCode * 59 + Plant.GetHashCode();
         }
         if (GrowthStage != null)
         {
             hashCode = hashCode * 59 + GrowthStage.GetHashCode();
         }
         if (Answer != null)
         {
             hashCode = hashCode * 59 + Answer.GetHashCode();
         }
         return(hashCode);
     }
 }
 /// <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 (GrowthStage != null)
         {
             hashCode = hashCode * 59 + GrowthStage.GetHashCode();
         }
         if (Ko != null)
         {
             hashCode = hashCode * 59 + Ko.GetHashCode();
         }
         return(hashCode);
     }
 }