/// <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 (ProductPhotoID != null) { hashCode = hashCode * 59 + ProductPhotoID.GetHashCode(); } if (ThumbNailPhoto != null) { hashCode = hashCode * 59 + ThumbNailPhoto.GetHashCode(); } if (ThumbNailPhotoFileName != null) { hashCode = hashCode * 59 + ThumbNailPhotoFileName.GetHashCode(); } if (LargePhoto != null) { hashCode = hashCode * 59 + LargePhoto.GetHashCode(); } if (LargePhotoFileName != null) { hashCode = hashCode * 59 + LargePhotoFileName.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + (LargePhoto == null ? 0 : LargePhoto.GetHashCode()); hash = hash * 23 + (LargePhotoFileName == null ? 0 : LargePhotoFileName.GetHashCode()); hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode()); hash = hash * 23 + (ThumbNailPhoto == null ? 0 : ThumbNailPhoto.GetHashCode()); hash = hash * 23 + (ThumbnailPhotoFileName == null ? 0 : ThumbnailPhotoFileName.GetHashCode()); return(hash); } }