public override int GetHashCode() { unchecked { // Choose large primes to avoid hashing collisions const int hashingBase = (int)2166136261; const int hashingMultiplier = 16777619; var hash = hashingBase; hash = (hash * hashingMultiplier) ^ (Assists != 0 ? Assists.GetHashCode() : 0); hash = (hash * hashingMultiplier) ^ (Goals != 0 ? Goals.GetHashCode() : 0); hash = (hash * hashingMultiplier) ^ (GamesPlayed != 0 ? GamesPlayed.GetHashCode() : 0); return(hash); } }