Ejemplo n.º 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);
     }
 }
Ejemplo n.º 2
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 (RegionId != null)
         {
             hashCode = hashCode * 59 + RegionId.GetHashCode();
         }
         if (RegionNm != null)
         {
             hashCode = hashCode * 59 + RegionNm.GetHashCode();
         }
         if (FarmId != null)
         {
             hashCode = hashCode * 59 + FarmId.GetHashCode();
         }
         if (Plant != null)
         {
             hashCode = hashCode * 59 + Plant.GetHashCode();
         }
         return(hashCode);
     }
 }