コード例 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (DefinitionId.Length != 0)
            {
                hash ^= DefinitionId.GetHashCode();
            }
            if (AddMoney != 0)
            {
                hash ^= AddMoney.GetHashCode();
            }
            if (ToolsTip != 0)
            {
                hash ^= ToolsTip.GetHashCode();
            }
            if (ToolsPuzzle != 0)
            {
                hash ^= ToolsPuzzle.GetHashCode();
            }
            if (Cast != 0F)
            {
                hash ^= Cast.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hash = DefinitionVariableId.GetHashCode();
         // Suitable nullity checks etc, of course :)
         hash = hash * 17 + DefinitionId.GetHashCode();
         hash = (VariableName != null) ? hash * 17 + VariableName.GetHashCode() : hash;
         hash = hash * 17 + StoreType.GetHashCode();
         return(hash);
     }
 }
コード例 #3
0
 public override int GetHashCode()
 {
     return(DefinitionId != null ? DefinitionId.GetHashCode() : 0);
 }