Exemple #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (CultureId == null ? 0 : CultureId.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (Name == null ? 0 : Name.GetHashCode());
         return(hash);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (CultureId == null ? 0 : CultureId.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (ProductDescriptionId == default(int) ? 0 : ProductDescriptionId.GetHashCode());
         hash = hash * 23 + (ProductModelId == default(int) ? 0 : ProductModelId.GetHashCode());
         return(hash);
     }
 }
Exemple #3
0
 /// <summary>
 /// Serves as a hash function for a <see cref="Faction"/> object.
 /// </summary>
 /// <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a
 /// hash table.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Id != null ? Id.GetHashCode() : 0) * 397) ^
                (Name != null ? Name.GetHashCode() : 0) ^
                (Description != null ? Description.GetHashCode() : 0) ^
                (FlagId != null ? FlagId.GetHashCode() : 0) ^
                (CultureId != null ? CultureId.GetHashCode() : 0) ^
                Colour.GetHashCode() ^
                Wealth.GetHashCode() ^
                Alive.GetHashCode());
     }
 }