/// <summary> /// From http://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode /// </summary> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hash = 17, hash2 = 23; // 2 random prime numbers hash = hash * hash2 + SkillCategoryId.GetHashCode(); hash = hash * hash2 + SkillCategoryText.GetHashCode(); hash = hash * hash2 + Rank.GetHashCode(); return(hash); } }
public static ILocalisable <string> ToLocalisable(this SkillCategory category) => SkillCategoryText.Localisable(category);