コード例 #1
0
ファイル: Game.cs プロジェクト: Chrislee187/chess.db
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Event != null ? Event.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Site != null ? Site.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (White != null ? White.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Black != null ? Black.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Date != null ? Date.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Round != null ? Round.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Result;
         hashCode = (hashCode * 397) ^ (MoveText != null ? MoveText.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Eco != null ? Eco.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ WhiteElo.GetHashCode();
         hashCode = (hashCode * 397) ^ BlackElo.GetHashCode();
         return(hashCode);
     }
 }
コード例 #2
0
 public override int GetHashCode()
 {
     return(Cyan.GetHashCode() ^ Magenta.GetHashCode() ^ Yellow.GetHashCode() ^ Black.GetHashCode());
 }