示例#1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 0;
         foreach (var kvp in _commodities.Where(kvp => kvp.Value != 0))
         {
             hash = hash * 17 + kvp.Key.Identifier.GetHashCode();
             hash = hash * 17 + kvp.Value.GetHashCode();
         }
         return(hash);
     }
 }