/// <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 (ProductModelID != null)
         {
             hashCode = hashCode * 59 + ProductModelID.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (CatalogDescription != null)
         {
             hashCode = hashCode * 59 + CatalogDescription.GetHashCode();
         }
         if (Instructions != null)
         {
             hashCode = hashCode * 59 + Instructions.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (CatalogDescription == null ? 0 : CatalogDescription.GetHashCode());
         hash = hash * 23 + (Instructions == null ? 0 : Instructions.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (Name == null ? 0 : Name.GetHashCode());
         hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode());
         return(hash);
     }
 }