/// <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()); } }