Esempio n. 1
0
 /// <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);
     }
 }
Esempio n. 2
0
 public static ILocalisable <string> ToLocalisable(this SkillCategory category)
 => SkillCategoryText.Localisable(category);